From c2cc47a449c3e16f7dd4d19a536c649ec56a9ac9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 18 Jun 2009 15:14:10 +0200 Subject: Support addr=... in option argument of -drive if=virtio Make drive_init() accept addr=, put the value into struct DriveInfo. Use it in all the places that create virtio-blk-pci devices: pc_init1(), bamboo_init(), mpc8544ds_init(). Don't support addr= in third argument of monitor command pci_add and second argument of drive_add, because that clashes with their first arguments. Admittedly unelegant. Signed-off-by: Markus Armbruster Signed-off-by: Anthony Liguori --- hw/ppc440_bamboo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/ppc440_bamboo.c') diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index f287ec7..d9ef3ec 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++; } -- cgit v1.1