All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: kvm-devel <kvm@vger.kernel.org>
Subject: [PATCH] Fix up ipf.c for recent merges
Date: Wed, 01 Jul 2009 18:24:51 +0200	[thread overview]
Message-ID: <87prckqsks.fsf@pike.pond.sub.org> (raw)

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 <armbru@redhat.com>
---
 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++;
 	}
     }
-- 
1.6.2.5


             reply	other threads:[~2009-07-01 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01 16:24 Markus Armbruster [this message]
2009-07-02 12:04 ` [PATCH] Fix up ipf.c for recent merges Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87prckqsks.fsf@pike.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.