From patchwork Wed Jul 1 16:24:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 33513 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n61GOvQB007536 for ; Wed, 1 Jul 2009 16:24:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753090AbZGAQYv (ORCPT ); Wed, 1 Jul 2009 12:24:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752900AbZGAQYv (ORCPT ); Wed, 1 Jul 2009 12:24:51 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34600 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752697AbZGAQYu (ORCPT ); Wed, 1 Jul 2009 12:24:50 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n61GOs3P025717 for ; Wed, 1 Jul 2009 12:24:54 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n61GOriq018230 for ; Wed, 1 Jul 2009 12:24:53 -0400 Received: from pike.pond.sub.org (vpn-10-2.str.redhat.com [10.32.10.2]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n61GOqXw030315 for ; Wed, 1 Jul 2009 12:24:52 -0400 Received: by pike.pond.sub.org (Postfix, from userid 1000) id D1B9710083; Wed, 1 Jul 2009 18:24:51 +0200 (CEST) To: kvm-devel Subject: [PATCH] Fix up ipf.c for recent merges From: Markus Armbruster Date: Wed, 01 Jul 2009 18:24:51 +0200 Message-ID: <87prckqsks.fsf@pike.pond.sub.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Commit 42f0a928 merged support for addr=... in option argument of -net nic, but failed to update ipf_init1(). Commit 7a8f3ed9 merged support for addr=... in option argument of -drive if=virtio, but failed to update ipf_init1(). Untested. Signed-off-by: Markus Armbruster --- hw/ipf.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ipf.c b/hw/ipf.c index 8aec258..04b7b2c 100644 --- a/hw/ipf.c +++ b/hw/ipf.c @@ -384,6 +384,7 @@ static void ipf_init1(ram_addr_t ram_size, ram_addr_t ram_addr; ram_addr_t above_4g_mem_size = 0; PCIBus *pci_bus; + PCIDevice *pci_dev; int piix3_devfn = -1; CPUState *env; qemu_irq *cpu_irq; @@ -543,7 +544,7 @@ static void ipf_init1(ram_addr_t ram_size, if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0)) pc_init_ne2k_isa(nd, i8259); else - pci_nic_init(pci_bus, nd, -1, "e1000"); + pci_nic_init(nd, "e1000", NULL); } #undef USE_HYPERCALL //Disable it now, need to implement later! @@ -628,7 +629,9 @@ static void ipf_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++; } }