[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



If I remember correctly, rdtscp is a valid instruction
in 32-bit mode so why are you disabling support for
32-bit Xen?

Personally, I don't care if 32-bit Xen is supported,
but either we need to say it is supported or it is
not supported, not have new features randomly choose
to support it or not, especially features that have
impact on userland applications.

> -----Original Message-----
> From: Jiang, Yunhong [mailto:yunhong.jiang@xxxxxxxxx]
> Sent: Monday, December 14, 2009 2:40 AM
> To: Keir Fraser
> Cc: Xu, Dongxiao; xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [Xen-devel] [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
> 
> 
>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.