summaryrefslogtreecommitdiff
path: root/hw/pci-host/q35.c
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2013-11-05 18:46:27 -0500
committerMichael S. Tsirkin <mst@redhat.com>2013-11-10 12:08:37 +0200
commit04c7d8b8dea724f1007f0f6e76047ff03b4cb24f (patch)
tree019e2c6abc0002a80903abd8fc4bc062aa156c33 /hw/pci-host/q35.c
parentc2d30667760e3d7b81290d801e567d4f758825ca (diff)
downloadqemu-04c7d8b8dea724f1007f0f6e76047ff03b4cb24f.tar.gz
qemu-04c7d8b8dea724f1007f0f6e76047ff03b4cb24f.tar.bz2
qemu-04c7d8b8dea724f1007f0f6e76047ff03b4cb24f.zip
Fix pc migration from qemu <= 1.5
The following commit introduced a migration incompatibility: commit 568f0690fd9aa4d39d84b04c1a5dbb53a915c3fe Author: David Gibson <david@gibson.dropbear.id.au> Date: Thu Jun 6 18:48:49 2013 +1000 pci: Replace pci_find_domain() with more general pci_root_bus_path() The issue is that i440fx savevm idstr went from 0000:00:00.0/I440FX to 0000:00.0/I440FX. Unfortunately we are stuck with the breakage for 1.6 machine types. Add a compat property to maintain the busted idstr for the 1.6 machine types, but revert to the old style format for 1.7+, and <= 1.5. Tested with migration from qemu 1.5, qemu 1.6, and qemu.git. Cc: qemu-stable@nongnu.org Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host/q35.c')
-rw-r--r--hw/pci-host/q35.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index b8feed1254..c043998e32 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,8 +61,13 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
PCIBus *rootbus)
{
- /* For backwards compat with old device paths */
- return "0000";
+ Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
+
+ /* For backwards compat with old device paths */
+ if (s->mch.short_root_bus) {
+ return "0000";
+ }
+ return "0000:00";
}
static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -124,6 +129,7 @@ static Property mch_props[] = {
MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+ DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 0),
DEFINE_PROP_END_OF_LIST(),
};