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

[Xen-changelog] [xen stable-4.2] x86: eliminate has_arch_mmios()



commit c9d1af481a5b73ea0c5ca86cbea3938c343ee51b
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Nov 15 11:47:41 2013 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Nov 15 11:47:41 2013 +0100

    x86: eliminate has_arch_mmios()
    
    ... as being generally insufficient: Either has_arch_pdevs() or
    cache_flush_permitted() should be used (in particular, it is
    insufficient to consider MMIO ranges alone - I/O port ranges have the
    same requirements if available to a guest).
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Keir Fraser <keir@xxxxxxx>
    master commit: 79233938ab2a8f273fd5dcdbf8e8381b9eb3a461
    master date: 2013-11-12 16:28:47 +0100
---
 xen/arch/x86/hvm/hvm.c       |    3 ++-
 xen/arch/x86/hvm/svm/svm.c   |    3 ++-
 xen/arch/x86/hvm/vmx/vmx.c   |    6 ++----
 xen/include/asm-x86/domain.h |    1 -
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 02b9b55..f7b3137 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -40,6 +40,7 @@
 #include <asm/current.h>
 #include <asm/e820.h>
 #include <asm/io.h>
+#include <asm/iocap.h>
 #include <asm/regs.h>
 #include <asm/cpufeature.h>
 #include <asm/processor.h>
@@ -1738,7 +1739,7 @@ int hvm_set_cr0(unsigned long value)
         }
     }
 
-    if ( has_arch_mmios(v->domain) )
+    if ( cache_flush_permitted(v->domain) )
     {
         if ( (value & X86_CR0_CD) && !(value & X86_CR0_NW) )
         {
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 48a3f01..c4da848 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -40,6 +40,7 @@
 #include <asm/debugreg.h>
 #include <asm/msr.h>
 #include <asm/i387.h>
+#include <asm/iocap.h>
 #include <asm/spinlock.h>
 #include <asm/hvm/emulate.h>
 #include <asm/hvm/hvm.h>
@@ -1994,7 +1995,7 @@ static void wbinvd_ipi(void *info)
 
 static void svm_wbinvd_intercept(void)
 {
-    if ( has_arch_mmios(current->domain) )
+    if ( cache_flush_permitted(current->domain) )
         on_each_cpu(wbinvd_ipi, NULL, 1);
 }
 
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index d7563c3..1e30557 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -28,6 +28,7 @@
 #include <xen/perfc.h>
 #include <asm/current.h>
 #include <asm/io.h>
+#include <asm/iocap.h>
 #include <asm/regs.h>
 #include <asm/cpufeature.h>
 #include <asm/processor.h>
@@ -2130,10 +2131,7 @@ static void wbinvd_ipi(void *info)
 
 static void vmx_wbinvd_intercept(void)
 {
-    if ( !has_arch_mmios(current->domain) )
-        return;
-
-    if ( iommu_snoop )
+    if ( !cache_flush_permitted(current->domain) || iommu_snoop )
         return;
 
     if ( cpu_has_wbinvd_exiting )
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 9412395..9be5239 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -328,7 +328,6 @@ struct arch_domain
 } __cacheline_aligned;
 
 #define has_arch_pdevs(d)    (!list_empty(&(d)->arch.pdev_list))
-#define has_arch_mmios(d)    (!rangeset_is_empty((d)->iomem_caps))
 
 #ifdef CONFIG_X86_64
 #define perdomain_pt_pgidx(v) \
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.2

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.