qemu-patch-raspberry4/include
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
..
block block: Move NVMe constants to a separate header 2018-02-08 09:22:03 +08:00
chardev chardev: introduce qemu_chr_timeout_add_ms() 2018-01-12 13:22:02 +01:00
crypto block: convert qcrypto_block_encrypt|decrypt to take bytes offset 2017-10-06 16:30:47 +02:00
disas target/xtensa: implement disassembler 2018-01-09 09:55:39 -08:00
exec * socket option parsing fix (Daniel) 2018-02-07 20:40:36 +00:00
fpu configure: Drop ancient Solaris 9 and earlier support 2017-07-21 15:04:05 +01:00
hw vhost: Clean out old vhost_set_memory and friends 2018-02-08 21:06:40 +02:00
io io: introduce a network socket listener API 2017-12-15 15:07:26 +00:00
libdecnumber Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
migration pci/bus: let it has higher migration priority 2018-02-08 21:06:41 +02:00
monitor block: rip out all traces of password prompting 2017-07-11 17:44:56 +02:00
net net: Remove the legacy "-net channel" parameter 2017-12-22 10:05:26 +08:00
qapi error: Improve documentation of error_append_hint() 2018-02-06 18:24:43 +01:00
qemu util: Introduce vfio helpers 2018-02-08 09:22:03 +08:00
qom accel/tcg: add size paremeter in tlb_fill() 2018-01-25 16:02:24 +01:00
scsi scsi: provide general-purpose functions to manage sense data 2017-12-21 09:30:32 +01:00
standard-headers linux-headers: update 2018-01-22 11:07:47 +01:00
sysemu block: Introduce buf register API 2018-02-08 09:22:03 +08:00
ui ui: fix alphabetical ordering of keymaps 2018-01-29 09:35:43 +01:00
elf.h tcg/s390: Use constant pool for movi 2017-09-07 11:57:35 -07:00
glib-compat.h glib-compat: move G_SOURCE_CONTINUE/REMOVE there 2017-10-10 16:33:55 +02:00
qemu-common.h Use HTTPS for qemu.org and other domains 2017-11-21 13:34:13 +00:00
qemu-io.h hmp: Request permissions in qemu-io 2017-02-28 20:47:50 +01:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00