From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ5Gq-0001Sd-IE for qemu-devel@nongnu.org; Thu, 22 Jan 2009 14:31:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ5Go-0001Qo-TN for qemu-devel@nongnu.org; Thu, 22 Jan 2009 14:31:20 -0500 Received: from [199.232.76.173] (port=38456 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ5Go-0001QV-D5 for qemu-devel@nongnu.org; Thu, 22 Jan 2009 14:31:18 -0500 Received: from oxygen.pond.sub.org ([213.239.205.148]:60682) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQ5Gn-0006KE-Rp for qemu-devel@nongnu.org; Thu, 22 Jan 2009 14:31:18 -0500 Received: from pike.pond.sub.org (pD9E3B496.dip.t-dialin.net [217.227.180.150]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 899C5276CAE for ; Thu, 22 Jan 2009 20:31:16 +0100 (CET) From: Markus Armbruster Date: Thu, 22 Jan 2009 20:31:03 +0100 Message-Id: <1232652665-1710-7-git-send-email-armbru@redhat.com> In-Reply-To: <87ocxzrvqb.fsf@pike.pond.sub.org> References: <87ocxzrvqb.fsf@pike.pond.sub.org> Subject: [Qemu-devel] [PATCH 7/9] Support pci=... in option argument of -drive if=virtio Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Markus Armbruster --- hw/pc.c | 3 ++- hw/ppc440_bamboo.c | 3 ++- hw/virtio-blk.c | 2 +- hw/virtio-blk.h | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 5e70ca6..5fd8356 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1091,7 +1091,8 @@ vga_bios_error: int unit_id = 0; while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) { - virtio_blk_init(pci_bus, drives_table[index].bdrv); + virtio_blk_init(drives_table[index].bdrv, + drives_opt[drives_table[index].drive_opt_idx].opt); unit_id++; } } diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index 3520b14..434fdc4 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -112,7 +112,8 @@ static void bamboo_init(ram_addr_t ram_size, int vga_ram_size, /* Add virtio block devices. */ while ((i = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) { - virtio_blk_init(pcibus, drives_table[i].bdrv); + virtio_blk_init(drives_table[i].bdrv, + drives_opt[drives_table[i].drive_opt_idx].opt); unit_id++; } diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index f3a0dcb..8217424 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -218,7 +218,7 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id) return 0; } -void *virtio_blk_init(PCIBus *bus, BlockDriverState *bs) +void *virtio_blk_init(BlockDriverState *bs, const char *opts) { VirtIOBlock *s; int cylinders, heads, secs; diff --git a/hw/virtio-blk.h b/hw/virtio-blk.h index 8c91e1e..4af3ccb 100644 --- a/hw/virtio-blk.h +++ b/hw/virtio-blk.h @@ -70,6 +70,6 @@ struct virtio_blk_inhdr unsigned char status; }; -void *virtio_blk_init(PCIBus *bus, BlockDriverState *bs); +void *virtio_blk_init(BlockDriverState *bs, const char *opts); #endif -- 1.6.0.6