ia64/xen-unstable

changeset 17557:45c975a6554d

Intel vpid: Invalidate VPID mapping on INVLPG.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 01 16:07:56 2008 +0100 (2008-05-01)
parents bb2301b33760
children eb3437db158b
files xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/vmx/vmx.h
line diff
     1.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Thu May 01 15:44:35 2008 +0100
     1.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Thu May 01 16:07:56 2008 +0100
     1.3 @@ -1368,7 +1368,8 @@ static void vmx_invlpg_intercept(unsigne
     1.4  {
     1.5      struct vcpu *curr = current;
     1.6      HVMTRACE_2D(INVLPG, curr, /*invlpga=*/ 0, vaddr);
     1.7 -    paging_invlpg(curr, vaddr);
     1.8 +    if ( paging_invlpg(curr, vaddr) )
     1.9 +        vpid_sync_vcpu_gva(curr, vaddr);
    1.10  }
    1.11  
    1.12  #define CASE_SET_REG(REG, reg)      \
     2.1 --- a/xen/include/asm-x86/hvm/vmx/vmx.h	Thu May 01 15:44:35 2008 +0100
     2.2 +++ b/xen/include/asm-x86/hvm/vmx/vmx.h	Thu May 01 16:07:56 2008 +0100
     2.3 @@ -301,6 +301,12 @@ static inline void ept_sync_all(void)
     2.4  
     2.5  void ept_sync_domain(struct domain *d);
     2.6  
     2.7 +static inline void vpid_sync_vcpu_gva(struct vcpu *v, unsigned long gva)
     2.8 +{
     2.9 +    if ( cpu_has_vmx_vpid )
    2.10 +        __invvpid(0, v->arch.hvm_vmx.vpid, (u64)gva);
    2.11 +}
    2.12 +
    2.13  static inline void vpid_sync_vcpu_all(struct vcpu *v)
    2.14  {
    2.15      if ( cpu_has_vmx_vpid )