aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc440_bamboo.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc440_bamboo.c')
-rw-r--r--hw/ppc440_bamboo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
index f287ec79c2..d9ef3eca82 100644
--- a/hw/ppc440_bamboo.c
+++ b/hw/ppc440_bamboo.c
@@ -90,6 +90,7 @@ static void bamboo_init(ram_addr_t ram_size,
{
unsigned int pci_irq_nrs[4] = { 28, 27, 26, 25 };
PCIBus *pcibus;
+ PCIDevice *pci_dev;
CPUState *env;
uint64_t elf_entry;
uint64_t elf_lowaddr;
@@ -110,7 +111,8 @@ static void bamboo_init(ram_addr_t ram_size,
/* Add virtio block devices. */
while ((i = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
- pci_create_simple(pcibus, -1, "virtio-blk-pci");
+ pci_dev = pci_create("virtio-blk-pci", drives_table[i].devaddr);
+ qdev_init(&pci_dev->qdev);
unit_id++;
}