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

xen-devel

[Top] [All Lists]

[Xen-devel] [VPID] Invalidate VPID mapping on INVLPG? [PATCH]

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [VPID] Invalidate VPID mapping on INVLPG? [PATCH]
From: Gianluca Guida <gianluca.guida@xxxxxxxxxxxxx>
Date: 2008年4月30日 15:25:32 +0100
Delivery-date: 2008年5月01日 07:57:37 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110)
Hello,
In processors supporting VPID I think we should invalidate the VPID mapping in the TLB after a shadow invlpg (in case EPT is turned off).
Signed-off-by: Gianluca Guida <gianluca.guida@xxxxxxxxxxxxx>
Gianluca
diff -r 483d006cc607 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c Fri Apr 25 13:46:27 2008 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Apr 30 15:07:48 2008 +0100
@@ -1368,7 +1368,8 @@ static void vmx_invlpg_intercept(unsigne
 {
 struct vcpu *curr = current;
 HVMTRACE_2D(INVLPG, curr, /*invlpga=*/ 0, vaddr);
- paging_invlpg(curr, vaddr);
+ if ( paging_invlpg(curr, vaddr) )
+ vpid_sync_vcpu_gva(curr, vaddr);
 }
 
 #define CASE_SET_REG(REG, reg) \
diff -r 483d006cc607 xen/include/asm-x86/hvm/vmx/vmx.h
--- a/xen/include/asm-x86/hvm/vmx/vmx.h Fri Apr 25 13:46:27 2008 +0100
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h Wed Apr 30 15:07:48 2008 +0100
@@ -301,6 +301,12 @@ static inline void ept_sync_all(void)
 
 void ept_sync_domain(struct domain *d);
 
+static inline void vpid_sync_vcpu_gva(struct vcpu *v, unsigned long gva)
+{
+ if ( cpu_has_vmx_vpid )
+ __invvpid(0, v->arch.hvm_vmx.vpid, (u64)gva);
+}
+
 static inline void vpid_sync_vcpu_all(struct vcpu *v)
 {
 if ( cpu_has_vmx_vpid )
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen , Keir Fraser
Next by Date: [Xen-devel] [PATCH] hvm's cpuid config fix , Jean Guyader
Previous by Thread: Re: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen , Keir Fraser
Next by Thread: RE: [Xen-devel] [VPID] Invalidate VPID mapping on INVLPG? [PATCH] , Li, Xin B
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /