mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
master commit: 79233938ab
master date: 2013-11-12 16:28:47 +0100
This commit is contained in:
1 parent
ec6f018351
commit
2df9704ad1
4 files changed
+6
-7
No files matched your search
@@ -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>
|
||||
@@ -1792,7 +1793,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) )
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
@@ -1973,7 +1974,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -2160,10 +2161,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 )
|
||||
|
||||
@@ -316,7 +316,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))
|
||||
|
||||
#define gdt_ldt_pt_idx(v) \
|
||||
((v)->vcpu_id >> (PAGETABLE_ORDER - GDT_LDT_VCPU_SHIFT))
|
||||
|
||||