[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Fix xen-legacy-backend qdev types


  • To: Jason Andryuk <jandryuk@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 30 Jun 2020 14:59:21 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, QEMU <qemu-devel@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Tue, 30 Jun 2020 13:59:38 +0000
  • Ironport-sdr: CdQDhhe/vltse0IAgZlqTjOb33oITBRQkWwnnAUWMqaDjQkGRd6MqEuQLO/+CTqMXjFgNhUWqB JQBFCCHtm1puW3hrPoIjtPK8ernonrSNiXM8VsGkdgzqFokXl+t43w61LqIv1NHI3ZZfZpWHuk 9VboYHAo/oukmhdxNbvsIf3tRDtl7Z1SClc12+m0i4kYRHmiUl5tuHkqDpnMmSSkMBySYTQjdy MTaGqtKs2CeNWNR+ARHaGj9+wIe/TIJbhnbzg+H/fCR14M0LRAER+lU6hYaKtoACQVCCA34/r4 0sE=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Jun 24, 2020 at 08:52:44AM -0400, Jason Andryuk wrote:
> On Wed, Jun 24, 2020 at 8:30 AM Paul Durrant <xadimgnik@xxxxxxxxx> wrote:
> >
> > > -----Original Message-----
> > > From: Jason Andryuk <jandryuk@xxxxxxxxx>
> > > Sent: 24 June 2020 13:20
> > > To: Stefano Stabellini <sstabellini@xxxxxxxxxx>; Anthony Perard 
> > > <anthony.perard@xxxxxxxxxx>; Paul
> > > Durrant <paul@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> > > Cc: Jason Andryuk <jandryuk@xxxxxxxxx>; qemu-devel@xxxxxxxxxx
> > > 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 <jandryuk@xxxxxxxxx>
> >
> > 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.

Since there's a choice to make, I think I'll take this patch, but I will
add:
Fixes: 81cb05732efb ("qdev: Assert devices are plugged into a bus that can take 
them")

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.