diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-07-05 12:11:38 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-07-05 12:11:38 +0100 |
commit | 87a31ef2dba39e7ce779a8c86fc50e055a85145b (patch) | |
tree | ca4c0ca60a4e7cc1325f08c08156ea54da8ca676 | |
parent | 583dee105aa6a3c09bd9d5c4bf829af337ca7815 (diff) | |
download | xen-87a31ef2dba39e7ce779a8c86fc50e055a85145b.tar.gz xen-87a31ef2dba39e7ce779a8c86fc50e055a85145b.tar.bz2 xen-87a31ef2dba39e7ce779a8c86fc50e055a85145b.zip |
VT-d: No need to emulate WBINVD when force snooping feature available
There is no cache coherency issue if VT-d engine's force snooping
feature available.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
xen-unstable changeset: 21715:70ac5171a48f
xen-unstable date: Mon Jul 05 08:28:08 2010 +0100
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmcs.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmx.c | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 11e7226b04..ebb73f8cf0 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -989,8 +989,10 @@ void vmx_do_resume(struct vcpu *v) * 1: flushing cache (wbinvd) when the guest is scheduled out if * there is no wbinvd exit, or * 2: execute wbinvd on all dirty pCPUs when guest wbinvd exits. + * If VT-d engine can force snooping, we don't need to do these. */ - if ( has_arch_pdevs(v->domain) && !cpu_has_wbinvd_exiting ) + if ( has_arch_pdevs(v->domain) && !iommu_snoop + && !cpu_has_wbinvd_exiting ) { int cpu = v->arch.hvm_vmx.active_cpu; if ( cpu != -1 ) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 8b06f6b20e..d5c8f0161a 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2101,6 +2101,9 @@ static void vmx_wbinvd_intercept(void) if ( !has_arch_mmios(current->domain) ) return; + if ( iommu_snoop ) + return; + if ( cpu_has_wbinvd_exiting ) on_each_cpu(wbinvd_ipi, NULL, 1); else |