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] Do not STI when transitioning from user to kernel mode i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Do not STI when transitioning from user to kernel mode in
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 14 Apr 2005 22:37:40 +0000
Delivery-date: Thu, 14 Apr 2005 23:03:25 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1300, 2005/04/14 23:37:40+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Do not STI when transitioning from user to kernel mode in
        x86/64 Xen. Otherwise, by directly entering restore_all_guest
        without first executing test_all_events, we risk ignoring
        pending softirq and event-delivery work.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 entry.S |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)


diff -Nru a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S       2005-04-14 19:03:38 -04:00
+++ b/xen/arch/x86/x86_64/entry.S       2005-04-14 19:03:38 -04:00
@@ -19,6 +19,14 @@
         movq (reg),reg;
 
         ALIGN
+/* %rbx: struct exec_domain, interrupts disabled */
+switch_to_kernel:
+        leaq  EDOMAIN_trap_bounce(%rbx),%rdx
+        movq  EDOMAIN_syscall_addr(%rbx),%rax
+        movq  %rax,TRAPBOUNCE_eip(%rdx)
+        movw  $0,TRAPBOUNCE_flags(%rdx)
+        call  create_bounce_frame
+
 /* %rbx: struct exec_domain */
 restore_all_guest:
         RESTORE_ALL
@@ -104,20 +112,12 @@
         pushq $0
         movl  $TRAP_syscall,4(%rsp)
         SAVE_ALL
-        sti
         GET_CURRENT(%rbx)
         testb $TF_kernel_mode,EDOMAIN_thread_flags(%rbx)
-        jnz   hypercall
+        jz    switch_to_kernel
 
-        leaq  EDOMAIN_trap_bounce(%rbx),%rdx
-        movq  EDOMAIN_syscall_addr(%rbx),%rax
-        movq  %rax,TRAPBOUNCE_eip(%rdx)
-        movw  $0,TRAPBOUNCE_flags(%rdx)
-        call  create_bounce_frame
-        jmp   restore_all_guest
-
-/* %rbx: struct exec_domain */
-hypercall:
+/*hypercall:*/
+        sti
         movq  %r10,%rcx
         andq  $(NR_hypercalls-1),%rax
         leaq  SYMBOL_NAME(hypercall_table)(%rip),%r10

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Do not STI when transitioning from user to kernel mode in, BitKeeper Bot <=