[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/14] pci: give pci devices a default name.
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 12/14] pci: give pci devices a default name. |
Date: |
Fri, 16 Sep 2011 11:00:32 -0500 |
Bus names are derived from names so now that PCI devices have a name, they also
have different bus names.
pc_piix relies on the bus name (*sigh*) so we need to update it.
Signed-off-by: Anthony Liguori <address@hidden>
---
hw/pc_piix.c | 6 ++++--
hw/pci.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 960589a..8f0ebd6 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -181,8 +181,10 @@ static void pc_init1(MemoryRegion *system_memory,
} else {
dev = pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
}
- idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
- idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
+ idebus[0] = qdev_get_child_bus(&dev->qdev,
+ "::i440fx::i440fx.0::slot[1.1].0");
+ idebus[1] = qdev_get_child_bus(&dev->qdev,
+ "::i440fx::i440fx.0::slot[1.1].1");
} else {
for(i = 0; i < MAX_IDE_BUS; i++) {
ISADevice *dev;
diff --git a/hw/pci.c b/hw/pci.c
index abad900..b889ac3 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1736,7 +1736,8 @@ PCIDevice *pci_create_multifunction(PCIBus *bus, int
devfn, bool multifunction,
devfn = pci_assign_devfn(bus, devfn, name);
- dev = qdev_create(&bus->qbus, name, NULL);
+ dev = qdev_create(&bus->qbus, name, "::slot[%d.%d]",
+ (devfn >> 3) & 0x1F, (devfn & 0x7));
qdev_prop_set_uint32(dev, "addr", devfn);
qdev_prop_set_bit(dev, "multifunction", multifunction);
--
1.7.4.1
- [Qemu-devel] [PATCH 00/14] qdev: assign unique names to all devices (part 1), Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 05/14] qdev: remove opts pointer tracking, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 01/14] apic: rename apic.id -> apic.index, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 13/14] ide: give IDE drives a default name in qdev, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 12/14] pci: give pci devices a default name.,
Anthony Liguori <=
- [Qemu-devel] [PATCH 09/14] fw_cfg: add name to global fw_cfg device, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 03/14] qdev: push id into qdev_create calls, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 02/14] qdev: enforce that no devices overload the id property, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 08/14] sysbus: make create_varargs take an id, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 14/14] pc: assign names to machine created devices, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Anthony Liguori, 2011/09/16