diff mbox

kvm : qemu : fix compilation error in kvm-userspace for ia64

Message ID 10C63FAD690C13458F0B32BCED571F1406D6778C@pdsmsx502.ccr.corp.intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Zhang, Yang March 3, 2009, 3:38 a.m. UTC
Hi
   	please to review it.
thanks

Best Regards
--yang

From 0cce141eae71bbb2012efd54ba38916c437cd030 Mon Sep 17 00:00:00 2001
From: Yang Zhang <yang.zhang@intel.com>
Date: Mon, 2 Mar 2009 22:29:08 -0500
Subject: [PATCH] kvm : qemu : fix compilation error in kvm-userspace for ia64

when using make sync, the msidef.h is missing. This patch
fix this. And IA64 does not need apic_set_irq_delivered().

Signed-off-by: Yang Zhang <yang.zhang@intel.com>
---
 kernel/Makefile |    3 ++-
 qemu/hw/i8259.c |    2 ++
 qemu/hw/ipf.c   |    2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

Comments

Marcelo Tosatti March 3, 2009, 1:32 p.m. UTC | #1
On Tue, Mar 03, 2009 at 11:38:17AM +0800, Zhang, Yang wrote:
> Hi
>    	please to review it.
> thanks
> 
> Best Regards
> --yang
> 
> >From 0cce141eae71bbb2012efd54ba38916c437cd030 Mon Sep 17 00:00:00 2001
> From: Yang Zhang <yang.zhang@intel.com>
> Date: Mon, 2 Mar 2009 22:29:08 -0500
> Subject: [PATCH] kvm : qemu : fix compilation error in kvm-userspace for ia64
> 
> when using make sync, the msidef.h is missing. This patch
> fix this. And IA64 does not need apic_set_irq_delivered().
> 
> Signed-off-by: Yang Zhang <yang.zhang@intel.com>
> ---
>  kernel/Makefile |    3 ++-
>  qemu/hw/i8259.c |    2 ++
>  qemu/hw/ipf.c   |    2 +-
>  3 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/Makefile b/kernel/Makefile
> index f8b341f..808f15e 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -61,7 +61,8 @@ headers-old = $(LINUX)/./include/asm-$(ARCH_DIR)/kvm*.h
>  headers-new = $(LINUX)/arch/$(ARCH_DIR)/include/asm/./kvm*.h \
>  	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./vmx*.h \
>  	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./svm*.h \
> -	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./virtext*.h
> +	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./virtext*.h \
> +	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./msidef*.h
>  
>  header-sync:
>  	rm -rf $T
> diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c
> index 9cb3941..025f993 100644
> --- a/qemu/hw/i8259.c
> +++ b/qemu/hw/i8259.c
> @@ -189,8 +189,10 @@ static void i8259_set_irq(void *opaque, int irq, int level)
>      if (kvm_enabled()) {
>          int pic_ret;
>          if (kvm_set_irq(irq, level, &pic_ret)) {
> +#ifndef TARGET_IA64
>              if (pic_ret != 0)
>                  apic_set_irq_delivered();
> +#endif

Why don't you define apic_set_irq_delivered for IA64?

>              return;
>          }
>      }
> diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
> index eb9aaec..73dac18 100644
> --- a/qemu/hw/ipf.c
> +++ b/qemu/hw/ipf.c
> @@ -701,7 +701,7 @@ void ioapic_set_irq(void *opaque, int irq_num, int level)
>          ioapic_irq_count[vector] -= 1;
>  
>      if (kvm_enabled()) {
> -	if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0))
> +	if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0, NULL))
>  	    return;
>      }
>  }
> -- 
> 1.6.0.rc1


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Zhang, Yang March 5, 2009, 1:36 a.m. UTC | #2
Marcelo Tosatti wrote:
> On Tue, Mar 03, 2009 at 11:38:17AM +0800, Zhang, Yang wrote:
>> diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c
>> index 9cb3941..025f993 100644
>> --- a/qemu/hw/i8259.c
>> +++ b/qemu/hw/i8259.c
>> @@ -189,8 +189,10 @@ static void i8259_set_irq(void *opaque, int
>>          irq, int level)      if (kvm_enabled()) { int pic_ret;
>>          if (kvm_set_irq(irq, level, &pic_ret)) {
>> +#ifndef TARGET_IA64
>>              if (pic_ret != 0)
>>                  apic_set_irq_delivered();
>> +#endif
> 
> Why don't you define apic_set_irq_delivered for IA64?

seems right, But i cannot find the proper place to define it. 
And i think we can do this at the time of we need to use it.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marcelo Tosatti March 5, 2009, 1:51 a.m. UTC | #3
On Thu, Mar 05, 2009 at 09:36:13AM +0800, Zhang, Yang wrote:
> Marcelo Tosatti wrote:
> > On Tue, Mar 03, 2009 at 11:38:17AM +0800, Zhang, Yang wrote:
> >> diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c
> >> index 9cb3941..025f993 100644
> >> --- a/qemu/hw/i8259.c
> >> +++ b/qemu/hw/i8259.c
> >> @@ -189,8 +189,10 @@ static void i8259_set_irq(void *opaque, int
> >>          irq, int level)      if (kvm_enabled()) { int pic_ret;
> >>          if (kvm_set_irq(irq, level, &pic_ret)) {
> >> +#ifndef TARGET_IA64
> >>              if (pic_ret != 0)
> >>                  apic_set_irq_delivered();
> >> +#endif
> > 
> > Why don't you define apic_set_irq_delivered for IA64?
> 
> seems right, But i cannot find the proper place to define it. 
> And i think we can do this at the time of we need to use it.

The thinking is avoid code from piling in kvm-userspace when it belongs
in upstream QEMU. #ifdef's like that are ugly, but OK. Will apply.

Can you please submit this one to be included in QEMU upstream?

commit f759e44e04f03798d83de53d2c295965c68126a2
Author: Yang <yang.zhang@intel.com>
Date:   Thu Jan 15 13:03:53 2009 +0800

    kvm: qemu: Save ia64 nvram

Thanks

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Zhang, Yang March 5, 2009, 1:55 a.m. UTC | #4
Marcelo Tosatti wrote:
> On Thu, Mar 05, 2009 at 09:36:13AM +0800, Zhang, Yang wrote:
>> seems right, But i cannot find the proper place to define it.
>> And i think we can do this at the time of we need to use it.
> 
> The thinking is avoid code from piling in kvm-userspace when it
> belongs in upstream QEMU. #ifdef's like that are ugly, but OK. Will
> apply. 

Thank you.

> Can you please submit this one to be included in QEMU upstream?
> 
> commit f759e44e04f03798d83de53d2c295965c68126a2
> Author: Yang <yang.zhang@intel.com>
> Date:   Thu Jan 15 13:03:53 2009 +0800
> 
>     kvm: qemu: Save ia64 nvram
> 

Ok.--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/kernel/Makefile b/kernel/Makefile
index f8b341f..808f15e 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -61,7 +61,8 @@  headers-old = $(LINUX)/./include/asm-$(ARCH_DIR)/kvm*.h
 headers-new = $(LINUX)/arch/$(ARCH_DIR)/include/asm/./kvm*.h \
 	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./vmx*.h \
 	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./svm*.h \
-	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./virtext*.h
+	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./virtext*.h \
+	$(LINUX)/arch/$(ARCH_DIR)/include/asm/./msidef*.h
 
 header-sync:
 	rm -rf $T
diff --git a/qemu/hw/i8259.c b/qemu/hw/i8259.c
index 9cb3941..025f993 100644
--- a/qemu/hw/i8259.c
+++ b/qemu/hw/i8259.c
@@ -189,8 +189,10 @@  static void i8259_set_irq(void *opaque, int irq, int level)
     if (kvm_enabled()) {
         int pic_ret;
         if (kvm_set_irq(irq, level, &pic_ret)) {
+#ifndef TARGET_IA64
             if (pic_ret != 0)
                 apic_set_irq_delivered();
+#endif
             return;
         }
     }
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index eb9aaec..73dac18 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -701,7 +701,7 @@  void ioapic_set_irq(void *opaque, int irq_num, int level)
         ioapic_irq_count[vector] -= 1;
 
     if (kvm_enabled()) {
-	if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0))
+	if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0, NULL))
 	    return;
     }
 }