On Wed, Jun 24, 2020 at 8:30 AM Paul Durrant <xadimg...@gmail.com> wrote: > > > -----Original Message----- > > From: Jason Andryuk <jandr...@gmail.com> > > Sent: 24 June 2020 13:20 > > To: Stefano Stabellini <sstabell...@kernel.org>; Anthony Perard > > <anthony.per...@citrix.com>; Paul > > Durrant <p...@xen.org>; xen-devel@lists.xenproject.org > > Cc: Jason Andryuk <jandr...@gmail.com>; qemu-de...@nongnu.org > > Subject: [PATCH] xen: Fix xen-legacy-backend qdev types > > > > xen-sysdev is a TYPE_SYS_BUS_DEVICE. bus_type should not be changed so > > that it can plug into the System bus. Otherwise this assert triggers: > > qemu-system-i386: hw/core/qdev.c:102: qdev_set_parent_bus: Assertion > > `dc->bus_type && object_dynamic_cast(OBJECT(bus), dc->bus_type)' > > failed. > > > > TYPE_XENBACKEND attaches to TYPE_XENSYSBUS, so its class_init needs to > > be set accordingly to attach the qdev. Otherwise the following assert > > triggers: > > qemu-system-i386: hw/core/qdev.c:102: qdev_set_parent_bus: Assertion > > `dc->bus_type && object_dynamic_cast(OBJECT(bus), dc->bus_type)' > > failed. > > > > TYPE_XENBACKEND is not a subclass of XEN_XENSYSDEV, so it's parent > > is just TYPE_DEVICE. Change that. > > > > Signed-off-by: Jason Andryuk <jandr...@gmail.com> > > Clearly we raced. This patch and my patch #1 are identical so I'm happy to > give my ack to this.
Yeah, looks like you beat me by a hair :) Either way it gets fixed is fine by me. Thanks, Jason