aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-12-14 14:24:53 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-12-19 14:06:17 +0200
commitaf0669f0edbbcb8c17f7c2b919089485c8327f4f (patch)
tree0576efda5752fe9b5865cdf45ee93a95e13af28c /hw/pci.c
parentcdfe17df88b335269ddabc7ade7a6148a1a20f0d (diff)
downloadqemu-af0669f0edbbcb8c17f7c2b919089485c8327f4f.zip
qemu-af0669f0edbbcb8c17f7c2b919089485c8327f4f.tar.gz
qemu-af0669f0edbbcb8c17f7c2b919089485c8327f4f.tar.bz2
pci: don't use bus number in migration, stub out
Using bus numbers in migration is clearly wrong as they are guest assigned. Not really sure what the right thing to do is, for now stick 0 in there so things keep working for non-nested setups, add a TODO. We also probably have to mark nested bridges as non-migrateable until this is fixed? Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/pci.c b/hw/pci.c
index ef00d20..0cb4117 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -2014,7 +2014,10 @@ static char *pcibus_get_dev_path(DeviceState *dev)
char path[16];
snprintf(path, sizeof(path), "%04x:%02x:%02x.%x",
- pci_find_domain(d->bus), d->config[PCI_SECONDARY_BUS],
+ pci_find_domain(d->bus),
+ 0 /* TODO: need a persistent path for nested buses.
+ * Note: pci_bus_num(d->bus) is not right as it's guest
+ * assigned. */,
PCI_SLOT(d->devfn), PCI_FUNC(d->devfn));
return strdup(path);