qemu/include/hw/i386
Paul Durrant dd29b5c30c xen: cleanup unrealized flash devices
The generic pc_machine_initfn() calls pc_system_flash_create() which creates
'system.flash0' and 'system.flash1' devices. These devices are then realized
by pc_system_flash_map() which is called from pc_system_firmware_init() which
itself is called via pc_memory_init(). The latter however is not called when
xen_enable() is true and hence the following assertion fails:

qemu-system-i386: hw/core/qdev.c:439: qdev_assert_realized_properly:
Assertion `dev->realized' failed

These flash devices are unneeded when using Xen so this patch avoids the
assertion by simply removing them using pc_system_flash_cleanup_unused().

Reported-by: Jason Andryuk <jandryuk@gmail.com>
Fixes: ebc29e1bea ("pc: Support firmware configuration with -blockdev")
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Tested-by: Jason Andryuk <jandryuk@gmail.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200624121841.17971-3-paul@xen.org>
Fixes: dfe8c79c44 ("qdev: Assert onboard devices all get realized properly")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2020-07-10 13:49:16 +01:00
..
apic_internal.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
apic-msidef.h i386/msi: Correct mask of destination ID in MSI address 2017-12-01 18:28:15 +02:00
apic.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
ich9.h hw/southbridge/ich9: Removed unused headers 2020-03-09 15:59:31 +01:00
intel_iommu.h misc: Replace zero-length arrays with flexible array member (automatic) 2020-03-16 22:07:42 +01:00
ioapic_internal.h hw/i386/ioapic_internal: Remove unused "hw/i386/ioapic.h" header 2020-03-09 15:59:31 +01:00
ioapic.h ioapic: use TYPE_FOO MACRO than constant string 2019-01-09 11:33:47 +01:00
microvm.h microvm: move virtio base to 0xfeb00000 2020-06-17 14:24:28 +02:00
pc.h xen: cleanup unrealized flash devices 2020-07-10 13:49:16 +01:00
topology.h hw/386: Add EPYC mode topology decoding functions 2020-03-31 19:13:32 -03:00
vmport.h hw/i386/vmport: Add support for CMD_GETHZ 2020-06-10 12:09:53 -04:00
x86-iommu.h Clean up header guards that don't match their file name 2019-05-13 08:58:55 +02:00
x86.h x86: move max-ram-below-4g to pc 2020-06-17 14:24:22 +02:00