* [PATCH] KVM : Qemu: update call pci_nic_init
@ 2009-01-15 7:36 Zhang, Yang
2009-01-15 8:31 ` Mark McLoughlin
2009-01-15 9:26 ` Avi Kivity
0 siblings, 2 replies; 4+ messages in thread
From: Zhang, Yang @ 2009-01-15 7:36 UTC (permalink / raw)
To: kvm-ia64@vger.kernel.org; +Cc: kvm@vger.kernel.org, Avi Kivity, Zhang, Xiantao
[-- Attachment #1: Type: text/plain, Size: 1936 bytes --]
Hi
As the definition pci_nic_init has modified, this patch update the corresponding calling in ipf_init1().
>From 53a66f524a6c2215d61da797cca4b7b1acbb1266 Mon Sep 17 00:00:00 2001
From: Yang <yang.zhang@intel.com>
Date: Thu, 15 Jan 2009 13:09:43 +0800
Subject: [PATCH] KVM : Qemu: update call pci_nic_init
update call pci_nic_init in ipf_init1
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Yang Zhang <yang.zhang@intel.com>
---
qemu/hw/ipf.c | 26 +++++---------------------
1 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index 4e9b052..0326ee9 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -550,28 +550,12 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size,
}
for(i = 0; i < nb_nics; i++) {
- nd = &nd_table[i];
- if (!nd->model) {
- if (pci_enabled) {
- nd->model = "ne2k_pci";
- } else {
- nd->model = "ne2k_isa";
- }
- }
- if (strcmp(nd->model, "ne2k_isa") == 0) {
+ NICInfo *nd = &nd_table[i];
+
+ if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0))
pc_init_ne2k_isa(nd, i8259);
- } else if (pci_enabled) {
- if (strcmp(nd->model, "?") == 0)
- fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n");
- if (!pci_nic_init(pci_bus, nd, -1))
- exit(1);
- } else if (strcmp(nd->model, "?") == 0) {
- fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n");
- exit(1);
- } else {
- fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model);
- exit(1);
- }
+ else
+ pci_nic_init(pci_bus, nd, -1, "e1000");
}
#undef USE_HYPERCALL //Disable it now, need to implement later!
--
1.6.0.rc1
[-- Attachment #2: 0001-KVM-Qemu-update-pci_nic_init.patch --]
[-- Type: application/octet-stream, Size: 1769 bytes --]
From 53a66f524a6c2215d61da797cca4b7b1acbb1266 Mon Sep 17 00:00:00 2001
From: Yang <yang.zhang@intel.com>
Date: Thu, 15 Jan 2009 13:09:43 +0800
Subject: [PATCH] KVM : Qemu: update call pci_nic_init
update call pci_nic_init in ipf_init1
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Yang Zhang <yang.zhang@intel.com>
---
qemu/hw/ipf.c | 26 +++++---------------------
1 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index 4e9b052..0326ee9 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -550,28 +550,12 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size,
}
for(i = 0; i < nb_nics; i++) {
- nd = &nd_table[i];
- if (!nd->model) {
- if (pci_enabled) {
- nd->model = "ne2k_pci";
- } else {
- nd->model = "ne2k_isa";
- }
- }
- if (strcmp(nd->model, "ne2k_isa") == 0) {
+ NICInfo *nd = &nd_table[i];
+
+ if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0))
pc_init_ne2k_isa(nd, i8259);
- } else if (pci_enabled) {
- if (strcmp(nd->model, "?") == 0)
- fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n");
- if (!pci_nic_init(pci_bus, nd, -1))
- exit(1);
- } else if (strcmp(nd->model, "?") == 0) {
- fprintf(stderr, "qemu: Supported ISA NICs: ne2k_isa\n");
- exit(1);
- } else {
- fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd->model);
- exit(1);
- }
+ else
+ pci_nic_init(pci_bus, nd, -1, "e1000");
}
#undef USE_HYPERCALL //Disable it now, need to implement later!
--
1.6.0.rc1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM : Qemu: update call pci_nic_init
2009-01-15 7:36 [PATCH] KVM : Qemu: update call pci_nic_init Zhang, Yang
@ 2009-01-15 8:31 ` Mark McLoughlin
2009-01-15 8:49 ` Zhang, Xiantao
2009-01-15 9:26 ` Avi Kivity
1 sibling, 1 reply; 4+ messages in thread
From: Mark McLoughlin @ 2009-01-15 8:31 UTC (permalink / raw)
To: Zhang, Yang
Cc: kvm-ia64@vger.kernel.org, kvm@vger.kernel.org, Avi Kivity,
Zhang, Xiantao
Hi,
On Thu, 2009-01-15 at 15:36 +0800, Zhang, Yang wrote:
> Hi
> As the definition pci_nic_init has modified, this patch update the
> corresponding calling in ipf_init1().
Yep, qemu/hw/ipf.c isn't upstream so it didn't get updated when the
function was changed.
Is there a plan to merge ia64 stuff into upstream QEMU?
> >From 53a66f524a6c2215d61da797cca4b7b1acbb1266 Mon Sep 17 00:00:00 2001
> From: Yang <yang.zhang@intel.com>
> Date: Thu, 15 Jan 2009 13:09:43 +0800
> Subject: [PATCH] KVM : Qemu: update call pci_nic_init
>
> update call pci_nic_init in ipf_init1
>
> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
> Signed-off-by: Yang Zhang <yang.zhang@intel.com>
Acked-by: Mark McLoughlin <markmc@redhat.com>
Cheers,
Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] KVM : Qemu: update call pci_nic_init
2009-01-15 8:31 ` Mark McLoughlin
@ 2009-01-15 8:49 ` Zhang, Xiantao
0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Xiantao @ 2009-01-15 8:49 UTC (permalink / raw)
To: Mark McLoughlin, Zhang, Yang
Cc: kvm-ia64@vger.kernel.org, kvm@vger.kernel.org, Avi Kivity,
Jes Sorensen
Mark McLoughlin wrote:
> Hi,
>
> On Thu, 2009-01-15 at 15:36 +0800, Zhang, Yang wrote:
>> Hi
>> As the definition pci_nic_init has modified, this patch update the
>> corresponding calling in ipf_init1().
>
> Yep, qemu/hw/ipf.c isn't upstream so it didn't get updated when the
> function was changed.
>
> Is there a plan to merge ia64 stuff into upstream QEMU?
Jes should be working on that :)
Xiantao
>>> From 53a66f524a6c2215d61da797cca4b7b1acbb1266 Mon Sep 17 00:00:00
>>> 2001
>> From: Yang <yang.zhang@intel.com>
>> Date: Thu, 15 Jan 2009 13:09:43 +0800
>> Subject: [PATCH] KVM : Qemu: update call pci_nic_init
>>
>> update call pci_nic_init in ipf_init1
>>
>> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
>> Signed-off-by: Yang Zhang <yang.zhang@intel.com>
>
> Acked-by: Mark McLoughlin <markmc@redhat.com>
>
> Cheers,
> Mark.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM : Qemu: update call pci_nic_init
2009-01-15 7:36 [PATCH] KVM : Qemu: update call pci_nic_init Zhang, Yang
2009-01-15 8:31 ` Mark McLoughlin
@ 2009-01-15 9:26 ` Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-01-15 9:26 UTC (permalink / raw)
To: Zhang, Yang; +Cc: kvm-ia64@vger.kernel.org, kvm@vger.kernel.org, Zhang, Xiantao
Zhang, Yang wrote:
> Hi
> As the definition pci_nic_init has modified, this patch update the corresponding calling in ipf_init1().
>
> From 53a66f524a6c2215d61da797cca4b7b1acbb1266 Mon Sep 17 00:00:00 2001
> From: Yang <yang.zhang@intel.com>
> Date: Thu, 15 Jan 2009 13:09:43 +0800
> Subject: [PATCH] KVM : Qemu: update call pci_nic_init
>
> update call pci_nic_init in ipf_init1
>
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-15 9:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 7:36 [PATCH] KVM : Qemu: update call pci_nic_init Zhang, Yang
2009-01-15 8:31 ` Mark McLoughlin
2009-01-15 8:49 ` Zhang, Xiantao
2009-01-15 9:26 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox