qemu-patch-raspberry4/hw
Peter Xu 9d6b9db19c pci/bus: let it has higher migration priority
In the past, we prioritized IOMMU migration so that we have such a
priority order:

    IOMMU > PCI Devices

When migrating a guest with both vIOMMU and a pcie-root-port, we'll
always migrate vIOMMU first, since pci buses will be seen to have the
same priority of general PCI devices.

That's problematic.

The thing is that PCI bus number information is stored in the root port,
and that is needed by vIOMMU during post_load(), e.g., to figure out
context entry for a device.  If we don't have correct bus numbers for
devices, we won't be able to recover device state of the DMAR memory
regions, and things will be messed up.

So let's boost the PCIe root ports to be even with higher priority:

   PCIe Root Port > IOMMU > PCI Devices

A smoke test shows that this patch fixes bug 1538953.

Also, apply this rule to all the PCI bus/bridge devices: ioh3420,
xio3130_downstream, xio3130_upstream, pcie_pci_bridge, pci-pci bridge,
i82801b11.

I noted that we set pcie_pci_bridge_dev_vmstate twice.  Clean that up
together.

CC: Alex Williamson <alex.williamson@redhat.com>
CC: Marcel Apfelbaum <marcel@redhat.com>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Dr. David Alan Gilbert <dgilbert@redhat.com>
CC: Juan Quintela <quintela@redhat.com>
CC: Laurent Vivier <lvivier@redhat.com>
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1538953
Reported-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-02-08 21:06:41 +02:00
..
9pfs tests: virtio-9p: add FLUSH operation test 2018-02-02 11:11:55 +01:00
acpi nvdimm: add 'unarmed' option 2018-01-19 11:18:51 -02:00
adc maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
alpha Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
arm hw/arm: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:26:42 +01:00
audio hw/audio/sb16.c: change dolog() to qemu_log_mask() 2018-02-02 08:19:47 +01:00
block virtio: remove event notifier cleanup call on de-assign 2018-02-08 21:06:26 +02:00
bt hw/bt: Replace fprintf(stderr, "*\n" with error_report() 2018-01-22 09:51:00 +01:00
char hw: convert the escc device to keycodemapdb 2018-01-29 09:30:25 +01:00
core * socket option parsing fix (Daniel) 2018-02-07 20:40:36 +00:00
cpu hw: use "qemu/osdep.h" as first #include in source files 2017-12-18 17:07:02 +03:00
cris cris: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
display exynos4210: workaround UBSAN compilation error 2018-02-05 18:09:45 +01:00
dma hw/dma: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:09 +01:00
gpio Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
hppa hw/hppa: Use qemu_log_mask instead of fprintf to stderr 2018-02-04 14:11:03 -08:00
i2c i2c: Add a CONFIG_I2C master switch to the configuration files 2018-02-05 18:09:45 +01:00
i386 qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
ide Pull request for various patches that have been reviewed and 2018-01-23 10:15:09 +00:00
input qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
intc qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
ipack pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
ipmi ipmi: Allow BMC device properties to be set 2018-01-30 15:52:53 -06:00
isa hw/isa: Replace fprintf(stderr, "*\n" with error_report() 2018-01-22 09:51:00 +01:00
lm32 hw/lm32: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
m68k m68k: mcf5208: use generic cpu_model parsing 2017-10-27 16:03:54 +02:00
mem nvdimm: add 'unarmed' option 2018-01-19 11:18:51 -02:00
microblaze xlnx-zynqmp-pmu: Connect the IPI device to the PMU 2018-01-26 11:09:09 +01:00
mips hw/mips: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
misc ivshmem: Disable irqfd on device reset 2018-02-07 14:09:24 +01:00
moxie hw/moxie: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
net qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
nios2 nios2: remove duplicated includes (in code commented out) 2017-12-18 17:07:02 +03:00
nvram i2c: Add a CONFIG_I2C master switch to the configuration files 2018-02-05 18:09:45 +01:00
openrisc hw/openrisc: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
pci hw/pci*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
pci-bridge pci/bus: let it has higher migration priority 2018-02-08 21:06:41 +02:00
pci-host hw/pci*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:26 +01:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc Error reporting patches for 2018-02-06 2018-02-07 16:26:01 +00:00
s390x s390x: fix storage attributes migration for non-small guests 2018-01-22 11:04:52 +01:00
scsi virtio: remove event notifier cleanup call on de-assign 2018-02-08 21:06:26 +02:00
sd hw/sd: Replace fprintf(stderr, "*\n" with DPRINTF() 2018-02-06 18:29:26 +01:00
sh4 pci: Rename root bus initialization functions for clarity 2017-12-05 19:13:45 +02:00
smbios Merge remote-tracking branch 'origin/master' into HEAD 2018-01-11 22:03:50 +02:00
sparc hw/sparc*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:46 +01:00
sparc64 hw/sparc*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:46 +01:00
ssi xilinx_spips: Correct usage of an uninitialized local variable 2018-01-25 11:45:30 +00:00
timer qdev: use device_class_set_parent_realize/unrealize/reset() 2018-02-05 13:54:38 +01:00
tpm tpm: tis: move one-line function into caller 2018-02-03 09:01:56 -05:00
tricore tricore: use generic cpu_model parsing 2017-10-27 16:04:27 +02:00
unicore32 hw/unicore32: restrict hw addr defines to source file 2017-12-18 17:07:02 +03:00
usb usb-ccid: convert CCIDCardClass::exitfn() -> unrealize() 2018-01-26 07:59:33 +01:00
vfio * socket option parsing fix (Daniel) 2018-02-07 20:40:36 +00:00
virtio vhost: Move log_dirty check 2018-02-08 21:06:41 +02:00
watchdog misc: drop old i386 dependency 2017-12-18 17:07:03 +03:00
xen hw/xen*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:46 +01:00
xenpv hw/xen*: Replace fprintf(stderr, "*\n" with error_report() 2018-02-06 18:29:46 +01:00
xtensa target/xtensa: allow different default CPU for MMU/noMMU 2018-01-22 11:54:23 -08:00
Makefile.objs 9pfs: fix dependencies 2017-08-30 18:23:25 +02:00