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

[Xen-changelog] [xen-unstable] VT-d: No need to emulate WBINVD when force snooping feature available



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1278314888 -3600
# Node ID 70ac5171a48fb26872d8f79fc866f3525a377b2f
# Parent  b7e2bb28bfb7c60a62e9ed4a9c3c705e8038b603
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@xxxxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vmcs.c |    4 +++-
 xen/arch/x86/hvm/vmx/vmx.c  |    3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff -r b7e2bb28bfb7 -r 70ac5171a48f xen/arch/x86/hvm/vmx/vmcs.c
--- a/xen/arch/x86/hvm/vmx/vmcs.c       Mon Jul 05 08:27:26 2010 +0100
+++ b/xen/arch/x86/hvm/vmx/vmcs.c       Mon Jul 05 08:28:08 2010 +0100
@@ -1064,8 +1064,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 -r b7e2bb28bfb7 -r 70ac5171a48f xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Mon Jul 05 08:27:26 2010 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Mon Jul 05 08:28:08 2010 +0100
@@ -2089,6 +2089,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

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


 


Rackspace

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