WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix build failure in 32 environment

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix build failure in 32 environment
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Mon, 14 Dec 2009 17:40:20 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 14 Dec 2009 01:41:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acp8oXNpU3VyZiXlRRiKs+gGQUUGSA==
Thread-topic: [PATCH] Fix build failure in 32 environment
Fix 32bit Hypervisor build issue, caused by memory hot-add changes and rdtscp 
patch.

Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxx>
Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>

diff -r 45fc26e2d05a xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Mon Dec 14 08:00:26 2009 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Mon Dec 14 17:26:43 2009 +0800
@@ -2558,6 +2558,7 @@ asmlinkage void vmx_vmexit_handler(struc
         __update_guest_eip(inst_len);
         hvm_rdtsc_intercept(regs);
         break;
+#ifdef __x86_64__
     case EXIT_REASON_RDTSCP:
     {
         struct vmx_msr_state *guest_state = &v->arch.hvm_vmx.msr_state;
@@ -2567,6 +2568,7 @@ asmlinkage void vmx_vmexit_handler(struc
         regs->ecx = (uint32_t)(guest_state->msrs[VMX_INDEX_MSR_TSC_AUX]);
         break;
     }
+#endif
     case EXIT_REASON_VMCALL:
     {
         int rc;
diff -r 45fc26e2d05a xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  Mon Dec 14 08:00:26 2009 +0000
+++ b/xen/include/asm-x86/mm.h  Mon Dec 14 17:33:13 2009 +0800
@@ -480,12 +480,14 @@ extern int pagefault_by_memadd(unsigned 
 extern int pagefault_by_memadd(unsigned long addr, struct cpu_user_regs *regs);
 extern int handle_memadd_fault(unsigned long addr, struct cpu_user_regs *regs);
 #else
-int pagefault_by_memadd(unsigned long addr, struct cpu_user_regs *regs)
+static inline int pagefault_by_memadd(unsigned long addr,
+                                      struct cpu_user_regs *regs)
 {
     return 0;
 }
 
-int handle_memadd_fault(unsigned long addr, struct cpu_user_regs *regs)
+static inline int handle_memadd_fault(unsigned long addr,
+                                      struct cpu_user_regs *regs)
 {
     return 0;
 }
@@ -533,7 +535,10 @@ int map_ldt_shadow_page(unsigned int);
 #ifdef CONFIG_X86_64
 extern int memory_add(unsigned long spfn, unsigned long epfn, unsigned int 
pxm);
 #else
-int memory_add(uint64_t spfn, uint64_t epfn, uint32_t pxm) {return -ENOSYS};
+static inline int memory_add(uint64_t spfn, uint64_t epfn, uint32_t pxm)
+{
+    return -ENOSYS;
+}
 #endif
 
 #ifdef CONFIG_COMPAT


Attachment: fix_32bit_build.patch
Description: fix_32bit_build.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel