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
84 lines
3.1 KiB
Diff
84 lines
3.1 KiB
Diff
# Commit 303066fdb1e4fe816e48acd665453f58b8399e81
|
|
# Date 2013-07-17 08:47:18 +0200
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
VMX: fix interaction of APIC-V and Viridian emulation
|
|
|
|
Viridian using a synthetic MSR for issuing EOI notifications bypasses
|
|
the normal in-processor handling, which would clear
|
|
GUEST_INTR_STATUS.SVI. Hence we need to do this in software in order
|
|
for future interrupts to get delivered.
|
|
|
|
Based on analysis by Yang Z Zhang <yang.z.zhang@intel.com>.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
Reviewed-by: Yang Zhang <yang.z.zhang@intel.com>
|
|
|
|
Index: xen-4.3.1-testing/xen/arch/x86/hvm/vlapic.c
|
|
===================================================================
|
|
--- xen-4.3.1-testing.orig/xen/arch/x86/hvm/vlapic.c
|
|
+++ xen-4.3.1-testing/xen/arch/x86/hvm/vlapic.c
|
|
@@ -395,6 +395,9 @@ void vlapic_EOI_set(struct vlapic *vlapi
|
|
|
|
vlapic_clear_vector(vector, &vlapic->regs->data[APIC_ISR]);
|
|
|
|
+ if ( hvm_funcs.handle_eoi )
|
|
+ hvm_funcs.handle_eoi(vector);
|
|
+
|
|
if ( vlapic_test_and_clear_vector(vector, &vlapic->regs->data[APIC_TMR]) )
|
|
vioapic_update_EOI(vlapic_domain(vlapic), vector);
|
|
|
|
Index: xen-4.3.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|
===================================================================
|
|
--- xen-4.3.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
|
+++ xen-4.3.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|
@@ -1507,6 +1507,15 @@ static void vmx_sync_pir_to_irr(struct v
|
|
vlapic_set_vector(i, &vlapic->regs->data[APIC_IRR]);
|
|
}
|
|
|
|
+static void vmx_handle_eoi(u8 vector)
|
|
+{
|
|
+ unsigned long status = __vmread(GUEST_INTR_STATUS);
|
|
+
|
|
+ /* We need to clear the SVI field. */
|
|
+ status &= VMX_GUEST_INTR_STATUS_SUBFIELD_BITMASK;
|
|
+ __vmwrite(GUEST_INTR_STATUS, status);
|
|
+}
|
|
+
|
|
static struct hvm_function_table __initdata vmx_function_table = {
|
|
.name = "VMX",
|
|
.cpu_up_prepare = vmx_cpu_up_prepare,
|
|
@@ -1559,6 +1568,7 @@ static struct hvm_function_table __initd
|
|
.process_isr = vmx_process_isr,
|
|
.deliver_posted_intr = vmx_deliver_posted_intr,
|
|
.sync_pir_to_irr = vmx_sync_pir_to_irr,
|
|
+ .handle_eoi = vmx_handle_eoi,
|
|
.nhvm_hap_walk_L1_p2m = nvmx_hap_walk_L1_p2m,
|
|
};
|
|
|
|
@@ -1585,7 +1595,10 @@ const struct hvm_function_table * __init
|
|
|
|
setup_ept_dump();
|
|
}
|
|
-
|
|
+
|
|
+ if ( !cpu_has_vmx_virtual_intr_delivery )
|
|
+ vmx_function_table.handle_eoi = NULL;
|
|
+
|
|
if ( cpu_has_vmx_posted_intr_processing )
|
|
alloc_direct_apic_vector(&posted_intr_vector, event_check_interrupt);
|
|
else
|
|
Index: xen-4.3.1-testing/xen/include/asm-x86/hvm/hvm.h
|
|
===================================================================
|
|
--- xen-4.3.1-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
|
+++ xen-4.3.1-testing/xen/include/asm-x86/hvm/hvm.h
|
|
@@ -186,6 +186,7 @@ struct hvm_function_table {
|
|
void (*process_isr)(int isr, struct vcpu *v);
|
|
void (*deliver_posted_intr)(struct vcpu *v, u8 vector);
|
|
void (*sync_pir_to_irr)(struct vcpu *v);
|
|
+ void (*handle_eoi)(u8 vector);
|
|
|
|
/*Walk nested p2m */
|
|
int (*nhvm_hap_walk_L1_p2m)(struct vcpu *v, paddr_t L2_gpa,
|