qemu-patch-raspberry4/hw/xen
Jason Andryuk 104a7f4e13 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@gmail.com>
Acked-by: Paul Durrant <pdurrant@amazon.com>
Fixes: 81cb05732e ("qdev: Assert devices are plugged into a bus that can take them")
Message-Id: <20200624121939.10282-1-jandryuk@gmail.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2020-07-10 13:49:16 +01:00
..
Makefile.objs xen: Actually fix build without passthrough 2020-06-26 09:39:37 -04:00
trace-events xen: perform XenDevice clean-up in XenBus watch handler 2019-09-24 12:18:47 +01:00
xen-backend.c xen: add a mechanism to automatically create XenDevice-s... 2019-01-14 13:45:40 +00:00
xen-bus-helper.c Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
xen-bus.c qdev: Drop qbus_set_bus_hotplug_handler() parameter @errp 2020-07-02 06:25:29 +02:00
xen-host-pci-device.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
xen-host-pci-device.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
xen-legacy-backend.c xen: Fix xen-legacy-backend qdev types 2020-07-10 13:49:16 +01:00
xen_devconfig.c Include sysemu/sysemu.h a lot less 2019-08-16 13:31:53 +02:00
xen_pt.c xen: fix build without pci passthrough 2020-06-12 11:20:12 -04:00
xen_pt.h xen: fix build without pci passthrough 2020-06-12 11:20:12 -04:00
xen_pt_config_init.c xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
xen_pt_graphics.c Avoid cpu_physical_memory_rw() with a constant is_write argument 2020-02-20 14:47:08 +01:00
xen_pt_load_rom.c hw/xen/xen_pt_load_rom: Remove unused includes 2020-02-27 11:50:30 +00:00
xen_pt_msi.c xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
xen_pt_stub.c xen: fix build without pci passthrough 2020-06-12 11:20:12 -04:00
xen_pvdev.c Include qemu/main-loop.h less 2019-08-16 13:31:52 +02:00