WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [SVM] Fix an interrupt race window in the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [SVM] Fix an interrupt race window in the do_launch/vmrun/vmexit loop for AMD-V.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Nov 2006 23:30:24 +0000
Delivery-date: Tue, 07 Nov 2006 15:30:28 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 2b89ebf00fc884f68168abea4159c11f31db131a
# Parent  cba947bc845063ed820142bb921121ab8ead6452
[SVM] Fix an interrupt race window in the do_launch/vmrun/vmexit loop for AMD-V.

There is also some comment cleanup in this patch.

This problem found by Virtual Iron (Dave Winchell), and patch also
provided by VI.

Signed-off-by: Tom Woller <thomas.woller@xxxxxxx>
Signed-off-by: Dave Winchell <dwinchell@xxxxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/svm/x86_32/exits.S |    7 +++----
 xen/arch/x86/hvm/svm/x86_64/exits.S |   11 +++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff -r cba947bc8450 -r 2b89ebf00fc8 xen/arch/x86/hvm/svm/x86_32/exits.S
--- a/xen/arch/x86/hvm/svm/x86_32/exits.S       Tue Nov 07 17:46:40 2006 +0000
+++ b/xen/arch/x86/hvm/svm/x86_32/exits.S       Tue Nov 07 17:48:18 2006 +0000
@@ -34,7 +34,7 @@
  * At VMExit time the processor saves the guest selectors, esp, eip, 
  * and eflags. Therefore we don't save them, but simply decrement 
  * the kernel stack pointer to make it consistent with the stack frame 
- * at usual interruption time. The eflags of the host is not saved by VMX, 
+ * at usual interruption time. The eflags of the host is not saved by AMD-V, 
  * and we set it to the fixed value.
  *
  * We also need the room, especially because orig_eax field is used 
@@ -89,8 +89,8 @@
 #define CLGI   .byte 0x0F,0x01,0xDD
 
 ENTRY(svm_asm_do_launch)
+        CLGI                
         sti
-        CLGI                
         GET_CURRENT(%ebx)
         movl VCPU_svm_vmcb(%ebx), %ecx
         movl 24(%esp), %eax
@@ -152,9 +152,8 @@ 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
+         * Check if we are going back to AMD-V based VM
          * By this time, all the setups in the VMCB must be complete.
          */
         jmp svm_asm_do_launch
diff -r cba947bc8450 -r 2b89ebf00fc8 xen/arch/x86/hvm/svm/x86_64/exits.S
--- a/xen/arch/x86/hvm/svm/x86_64/exits.S       Tue Nov 07 17:46:40 2006 +0000
+++ b/xen/arch/x86/hvm/svm/x86_64/exits.S       Tue Nov 07 17:48:18 2006 +0000
@@ -1,5 +1,5 @@
 /*
- * exits.S: SVM architecture-specific exit handling.
+ * exits.S: AMD-V architecture-specific exit handling.
  * Copyright (c) 2004, Intel Corporation.
  * Copyright (c) 2005, AMD Corporation.
  *
@@ -34,7 +34,7 @@
  * At VMExit time the processor saves the guest selectors, rsp, rip, 
  * and rflags. Therefore we don't save them, but simply decrement 
  * the kernel stack pointer to make it consistent with the stack frame 
- * at usual interruption time. The rflags of the host is not saved by VMX, 
+ * at usual interruption time. The rflags of the host is not saved by AMD-V, 
  * and we set it to the fixed value.
  *
  * We also need the room, especially because orig_eax field is used 
@@ -99,8 +99,8 @@
 #define CLGI   .byte 0x0F,0x01,0xDD
 
 ENTRY(svm_asm_do_launch)
+        CLGI                
         sti
-        CLGI                
         GET_CURRENT(%rbx)
         movq VCPU_svm_vmcb(%rbx), %rcx
         movq UREGS_rax(%rsp), %rax
@@ -165,10 +165,9 @@ 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.
+         * Check if we are going back to AMD-V based VM
+         * By this time, all the setups in the VMCB must be complete.
          */
         jmp svm_asm_do_launch
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [SVM] Fix an interrupt race window in the do_launch/vmrun/vmexit loop for AMD-V., Xen patchbot-unstable <=