xen/xu-12278-hvm-interrupt-race.diff

58 lines
2.0 KiB
Diff

# HG changeset patch
# User kfraser@localhost.localdomain
# Date Tue Nov 07 17:48:18 2006 +0000
# Node ID 2b89ebf00fc884f68168abea4159c11f31db131a
# parent: cba947bc845063ed820142bb921121ab8ead6452
[SVM] Fix an interrupt race window in the do_launch/vmrun/vmexit loop for AMD-V.
This problem found by Virtual Iron (Dave Winchell), and patch also
provided by VI.
Signed-off-by: Tom Woller <thomas.woller@amd.com>
Signed-off-by: Dave Winchell <dwinchell@virtualiron.com>
Index: xen-3.0.3-testing/xen/arch/x86/hvm/svm/x86_32/exits.S
===================================================================
--- xen-3.0.3-testing.orig/xen/arch/x86/hvm/svm/x86_32/exits.S
+++ xen-3.0.3-testing/xen/arch/x86/hvm/svm/x86_32/exits.S
@@ -89,8 +89,8 @@
#define CLGI .byte 0x0F,0x01,0xDD
ENTRY(svm_asm_do_launch)
- sti
CLGI
+ sti
GET_CURRENT(%ebx)
movl VCPU_svm_vmcb(%ebx), %ecx
movl 24(%esp), %eax
@@ -153,7 +153,6 @@ svm_restore_all_guest:
call svm_intr_assist
call svm_asid
call svm_load_cr2
- sti
/*
* Check if we are going back to SVM-based VM
* By this time, all the setups in the VMCB must be complete.
Index: xen-3.0.3-testing/xen/arch/x86/hvm/svm/x86_64/exits.S
===================================================================
--- xen-3.0.3-testing.orig/xen/arch/x86/hvm/svm/x86_64/exits.S
+++ xen-3.0.3-testing/xen/arch/x86/hvm/svm/x86_64/exits.S
@@ -99,8 +99,8 @@
#define CLGI .byte 0x0F,0x01,0xDD
ENTRY(svm_asm_do_launch)
- sti
CLGI
+ sti
GET_CURRENT(%rbx)
movq VCPU_svm_vmcb(%rbx), %rcx
movq UREGS_rax(%rsp), %rax
@@ -165,7 +165,6 @@ svm_restore_all_guest:
call svm_intr_assist
call svm_asid
call svm_load_cr2
- sti
/*
* Check if we are going back to VMX-based VM
* By this time, all the setups in the VMCS must be complete.