a11c33863f
5281fad4-numa-sched-leave-node-affinity-alone-if-not-in-auto-mode.patch 52820823-nested-SVM-adjust-guest-handling-of-structure-mappings.patch 52820863-VMX-don-t-crash-processing-d-debug-key.patch 5282492f-x86-eliminate-has_arch_mmios.patch 52864df2-credit-Update-other-parameters-when-setting-tslice_ms.patch 52864f30-fix-leaking-of-v-cpu_affinity_saved-on-domain-destruction.patch 5289d225-nested-VMX-don-t-ignore-mapping-errors.patch 528a0eb0-x86-consider-modules-when-cutting-off-memory.patch 528f606c-x86-hvm-reset-TSC-to-0-after-domain-resume-from-S3.patch 528f609c-x86-crash-disable-the-watchdog-NMIs-on-the-crashing-cpu.patch 52932418-x86-xsave-fix-nonlazy-state-handling.patch - Add missing requires to pciutils package for xend-tools - bnc#851749 - Xen service file does not call xend properly xend.service - bnc#851386 - VUL-0: xen: XSA-78: Insufficient TLB flushing in VT-d (iommu) code 528a0e5b-TLB-flushing-in-dma_pte_clear_one.patch - bnc#849667 - VUL-0: xen: XSA-74: Lock order reversal between page_alloc_lock and mm_rwlock CVE-2013-4553-xsa74.patch - bnc#849665 - VUL-0: CVE-2013-4551: xen: XSA-75: Host crash due to guest VMX instruction execution 52809208-nested-VMX-VMLANUCH-VMRESUME-emulation-must-check-permission-1st.patch - bnc#849668 - VUL-0: xen: XSA-76: Hypercalls exposed to privilege rings 1 and 2 of HVM guests OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=279
85 lines
2.4 KiB
Diff
85 lines
2.4 KiB
Diff
# Commit 79233938ab2a8f273fd5dcdbf8e8381b9eb3a461
|
|
# Date 2013-11-12 16:28:47 +0100
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
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>
|
|
|
|
--- 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>
|
|
@@ -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) )
|
|
{
|
|
--- 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>
|
|
@@ -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);
|
|
}
|
|
|
|
--- 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>
|
|
@@ -2173,10 +2174,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 )
|
|
--- a/xen/include/asm-x86/domain.h
|
|
+++ b/xen/include/asm-x86/domain.h
|
|
@@ -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))
|