diff options
Diffstat (limited to 'hw/pc.c')
-rw-r--r-- | hw/pc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -848,6 +848,7 @@ static void pc_init1(ram_addr_t ram_size, ram_addr_t below_4g_mem_size, above_4g_mem_size = 0; int bios_size, isa_bios_size, oprom_area_size; PCIBus *pci_bus; + PCIDevice *pci_dev; int piix3_devfn = -1; CPUState *env; qemu_irq *cpu_irq; @@ -1161,7 +1162,9 @@ static void pc_init1(ram_addr_t ram_size, int unit_id = 0; while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) { - pci_create_simple(pci_bus, -1, "virtio-blk-pci"); + pci_dev = pci_create("virtio-blk-pci", + drives_table[index].devaddr); + qdev_init(&pci_dev->qdev); unit_id++; } } |