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] x86-64 linux: call evtchn_do_upcall on irq stack and adj

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] x86-64 linux: call evtchn_do_upcall on irq stack and adjust irqcount
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 Feb 2006 17:10:07 +0000
Delivery-date: Wed, 08 Feb 2006 17:22:09 +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-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 1a2e7cd58ca0df9a9c10631e60474f0dc0dfc659
# Parent  c9edeb3bd65220e64650fecf5e10151f64de3791
x86-64 linux: call evtchn_do_upcall on irq stack and adjust irqcount
Especially in the light of the recent no-idle-tick preparations in
native x86-64 it is important that exit_idle() has proper state
available.  For this reason, the processor's irqcount must be adjusted
within upcalls, and for consistency and similarity with native code
this call should also execute on the processor's irq stack.
At once the patch slightly simplifies the pre-existing code by copying
%rdi into %rsp instead of adding 8 to %rsp, and by using %rdi instead
of %rsp (avoiding a needless resource dependency) for storing the event
mask.

From: Jan Beulich <JBeulich@xxxxxxxxxx>
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r c9edeb3bd652 -r 1a2e7cd58ca0 
linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Wed Feb  8 
12:03:52 2006
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Wed Feb  8 
15:31:38 2006
@@ -826,10 +826,16 @@
 ENTRY(do_hypervisor_callback)   # do_hyperviosr_callback(struct *pt_regs)
 # Since we don't modify %rdi, evtchn_do_upall(struct *pt_regs) will
 # see the correct pointer to the pt_regs
-        addq $8, %rsp            # we don't return, adjust the stack frame
-11:    movb $0, EVENT_MASK(%rsp)         
+       movq %rdi, %rsp            # we don't return, adjust the stack frame
+11:    movb $0, EVENT_MASK(%rdi)
+       movq %gs:pda_irqstackptr,%rax
+       incl %gs:pda_irqcount
+       cmovzq %rax,%rsp
+       pushq %rdi
        call evtchn_do_upcall
-        jmp  error_exit
+       popq %rsp
+       decl %gs:pda_irqcount
+       jmp  error_exit
 
 #ifdef CONFIG_X86_LOCAL_APIC
 ENTRY(nmi)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] x86-64 linux: call evtchn_do_upcall on irq stack and adjust irqcount, Xen patchbot -unstable <=