From: Niels de Vos <devos@fedoraproject.org>
To: qemu-devel@nongnu.org
Cc: Niels de Vos <devos@fedoraproject.org>,
Niels de Vos <niels@nixpanic.net>
Subject: [Qemu-devel] [PATCH 1/1] Use "pci.0" as bus->name for PCI-busses like qemu-kvm does already
Date: Fri, 28 Jan 2011 15:54:02 +0000 [thread overview]
Message-ID: <1296230042-26336-2-git-send-email-devos@fedoraproject.org> (raw)
In-Reply-To: <1296230042-26336-1-git-send-email-devos@fedoraproject.org>
From: Niels de Vos <niels@nixpanic.net>
This should fix issues with qemu-system-{arm,ppc} and possibly others
where libvirt passes bus=pci.0 in the -device options.
Reference:
- https://bugzilla.redhat.com/show_bug.cgi?id=667345
Signed-off-by: Niels de Vos <devos@fedoraproject.org>
---
hw/apb_pci.c | 2 +-
hw/bonito.c | 2 +-
hw/grackle_pci.c | 2 +-
hw/gt64xxx.c | 2 +-
hw/ppc4xx_pci.c | 2 +-
hw/ppce500_pci.c | 2 +-
hw/prep_pci.c | 2 +-
hw/realview.c | 2 +-
hw/sh_pci.c | 2 +-
hw/unin_pci.c | 4 ++--
hw/versatile_pci.c | 2 +-
hw/versatilepb.c | 2 +-
12 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/hw/apb_pci.c b/hw/apb_pci.c
index 84e9af7..da8df91 100644
--- a/hw/apb_pci.c
+++ b/hw/apb_pci.c
@@ -348,7 +348,7 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base,
sysbus_mmio_map(s, 2, special_base + 0x2000000ULL);
d = FROM_SYSBUS(APBState, s);
- d->bus = pci_register_bus(&d->busdev.qdev, "pci",
+ d->bus = pci_register_bus(&d->busdev.qdev, "pci.0",
pci_apb_set_irq, pci_pbm_map_irq, d,
0, 32);
pci_bus_set_mem_base(d->bus, mem_base);
diff --git a/hw/bonito.c b/hw/bonito.c
index 65a4a63..dc15db5 100644
--- a/hw/bonito.c
+++ b/hw/bonito.c
@@ -776,7 +776,7 @@ PCIBus *bonito_init(qemu_irq *pic)
dev = qdev_create(NULL, "Bonito-pcihost");
pcihost = FROM_SYSBUS(BonitoState, sysbus_from_qdev(dev));
- b = pci_register_bus(&pcihost->busdev.qdev, "pci", pci_bonito_set_irq,
+ b = pci_register_bus(&pcihost->busdev.qdev, "pci.0", pci_bonito_set_irq,
pci_bonito_map_irq, pic, 0x28, 32);
pcihost->bus = b;
qdev_init_nofail(dev);
diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c
index bd3d6b0..7ac5684 100644
--- a/hw/grackle_pci.c
+++ b/hw/grackle_pci.c
@@ -88,7 +88,7 @@ PCIBus *pci_grackle_init(uint32_t base, qemu_irq *pic)
qdev_init_nofail(dev);
s = sysbus_from_qdev(dev);
d = FROM_SYSBUS(GrackleState, s);
- d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci",
+ d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci.0",
pci_grackle_set_irq,
pci_grackle_map_irq,
pic, 0, 4);
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
index 923073b..b437f24 100644
--- a/hw/gt64xxx.c
+++ b/hw/gt64xxx.c
@@ -1109,7 +1109,7 @@ PCIBus *gt64120_register(qemu_irq *pic)
qdev_init_nofail(dev);
s = sysbus_from_qdev(dev);
d = FROM_SYSBUS(GT64120State, s);
- d->pci.bus = pci_register_bus(&d->busdev.qdev, "pci",
+ d->pci.bus = pci_register_bus(&d->busdev.qdev, "pci.0",
gt64120_pci_set_irq, gt64120_pci_map_irq,
pic, PCI_DEVFN(18, 0), 4);
d->ISD_handle = cpu_register_io_memory(gt64120_read, gt64120_write, d,
diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c
index f62f1f9..b45bb31 100644
--- a/hw/ppc4xx_pci.c
+++ b/hw/ppc4xx_pci.c
@@ -344,7 +344,7 @@ PCIBus *ppc4xx_pci_init(CPUState *env, qemu_irq pci_irqs[4],
controller = qemu_mallocz(sizeof(PPC4xxPCIState));
- controller->pci_state.bus = pci_register_bus(NULL, "pci",
+ controller->pci_state.bus = pci_register_bus(NULL, "pci.0",
ppc4xx_pci_set_irq,
ppc4xx_pci_map_irq,
pci_irqs, 0, 4);
diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c
index 11edd03..a40d6d6 100644
--- a/hw/ppce500_pci.c
+++ b/hw/ppce500_pci.c
@@ -276,7 +276,7 @@ PCIBus *ppce500_pci_init(qemu_irq pci_irqs[4], target_phys_addr_t registers)
controller = qemu_mallocz(sizeof(PPCE500PCIState));
- controller->pci_state.bus = pci_register_bus(NULL, "pci",
+ controller->pci_state.bus = pci_register_bus(NULL, "pci.0",
mpc85xx_pci_set_irq,
mpc85xx_pci_map_irq,
pci_irqs, PCI_DEVFN(0x11, 0),
diff --git a/hw/prep_pci.c b/hw/prep_pci.c
index f88b825..c61c446 100644
--- a/hw/prep_pci.c
+++ b/hw/prep_pci.c
@@ -117,7 +117,7 @@ PCIBus *pci_prep_init(qemu_irq *pic)
int PPC_io_memory;
s = qemu_mallocz(sizeof(PREPPCIState));
- s->bus = pci_register_bus(NULL, "pci",
+ s->bus = pci_register_bus(NULL, "pci.0",
prep_set_irq, prep_map_irq, pic, 0, 4);
pci_host_conf_register_ioport(0xcf8, s);
diff --git a/hw/realview.c b/hw/realview.c
index 6eb6c6a..bddedaa 100644
--- a/hw/realview.c
+++ b/hw/realview.c
@@ -266,7 +266,7 @@ static void realview_init(ram_addr_t ram_size,
if (!is_pb) {
dev = sysbus_create_varargs("realview_pci", 0x60000000,
pic[48], pic[49], pic[50], pic[51], NULL);
- pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
+ pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
if (usb_enabled) {
usb_ohci_init_pci(pci_bus, -1);
}
diff --git a/hw/sh_pci.c b/hw/sh_pci.c
index e99d8db..8c7e3bd 100644
--- a/hw/sh_pci.c
+++ b/hw/sh_pci.c
@@ -125,7 +125,7 @@ static int sh_pci_init_device(SysBusDevice *dev)
for (i = 0; i < 4; i++) {
sysbus_init_irq(dev, &s->irq[i]);
}
- s->bus = pci_register_bus(&s->busdev.qdev, "pci",
+ s->bus = pci_register_bus(&s->busdev.qdev, "pci.0",
sh_pci_set_irq, sh_pci_map_irq,
s->irq, PCI_DEVFN(0, 0), 4);
s->memconfig = cpu_register_io_memory(sh_pci_reg.r, sh_pci_reg.w,
diff --git a/hw/unin_pci.c b/hw/unin_pci.c
index 5f15058..4aabf37 100644
--- a/hw/unin_pci.c
+++ b/hw/unin_pci.c
@@ -234,7 +234,7 @@ PCIBus *pci_pmac_init(qemu_irq *pic)
qdev_init_nofail(dev);
s = sysbus_from_qdev(dev);
d = FROM_SYSBUS(UNINState, s);
- d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci",
+ d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci.0",
pci_unin_set_irq, pci_unin_map_irq,
pic, PCI_DEVFN(11, 0), 4);
@@ -286,7 +286,7 @@ PCIBus *pci_pmac_u3_init(qemu_irq *pic)
s = sysbus_from_qdev(dev);
d = FROM_SYSBUS(UNINState, s);
- d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci",
+ d->host_state.bus = pci_register_bus(&d->busdev.qdev, "pci.0",
pci_unin_set_irq, pci_unin_map_irq,
pic, PCI_DEVFN(11, 0), 4);
diff --git a/hw/versatile_pci.c b/hw/versatile_pci.c
index 2fed8a0..177e368 100644
--- a/hw/versatile_pci.c
+++ b/hw/versatile_pci.c
@@ -109,7 +109,7 @@ static int pci_vpb_init(SysBusDevice *dev)
for (i = 0; i < 4; i++) {
sysbus_init_irq(dev, &s->irq[i]);
}
- bus = pci_register_bus(&dev->qdev, "pci",
+ bus = pci_register_bus(&dev->qdev, "pci.0",
pci_vpb_set_irq, pci_vpb_map_irq, s->irq,
PCI_DEVFN(11, 0), 4);
diff --git a/hw/versatilepb.c b/hw/versatilepb.c
index 9f1bfcf..8407876 100644
--- a/hw/versatilepb.c
+++ b/hw/versatilepb.c
@@ -216,7 +216,7 @@ static void versatile_init(ram_addr_t ram_size,
dev = sysbus_create_varargs("versatile_pci", 0x40000000,
sic[27], sic[28], sic[29], sic[30], NULL);
- pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
+ pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
/* The Versatile PCI bridge does not provide access to PCI IO space,
so many of the qemu PCI devices are not useable. */
--
1.7.3.5
next prev parent reply other threads:[~2011-01-28 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 15:54 [Qemu-devel] [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter Niels de Vos
2011-01-28 15:54 ` Niels de Vos [this message]
2011-01-29 21:44 ` [Qemu-devel] [PATCH 1/1] Use "pci.0" as bus->name for PCI-busses like qemu-kvm does already Blue Swirl
2011-01-30 17:40 ` Niels de Vos
2011-01-28 16:12 ` [Qemu-devel] [PATCH 0/1] qemu-system-$ARCH incompatible with qemu-kvm and bus=pci.0 parameter Daniel P. Berrange
2011-01-30 17:42 ` Niels de Vos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296230042-26336-2-git-send-email-devos@fedoraproject.org \
--to=devos@fedoraproject.org \
--cc=niels@nixpanic.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.