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-ppc-devel

[XenPPC] [pushed][ppc] Must check softirq conditions on return from hcal

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [pushed][ppc] Must check softirq conditions on return from hcall.
From: jimix@xxxxxxxxxxxxxx
Date: Wed, 29 Mar 2006 12:34:49 -0500
Delivery-date: Wed, 29 Mar 2006 17:34:21 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
changeset:   9667:910d71f2bf1b
tag:         tip
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Wed Mar 29 12:33:40 2006 -0500
summary:     [ppc] Must check softirq conditions on return from hcall.

diff -r 06bc81089a95 -r 910d71f2bf1b xen/arch/ppc/ppc64/exceptions.S
--- a/xen/arch/ppc/ppc64/exceptions.S   Wed Mar 29 12:32:25 2006 -0500
+++ b/xen/arch/ppc/ppc64/exceptions.S   Wed Mar 29 12:33:40 2006 -0500
@@ -365,9 +365,33 @@ ex_hcall_continued:
     mr r3, r1                           /* pass pointer to cpu_user_regs */
     subi r1, r1, STACK_FRAME_OVERHEAD   /* make a "caller" stack frame */
     CALL_CFUNC r12
-
+    /* test for pending softirqs, and loop until there are no more. */
+hcall_test_all_events:
+    ld r3, PAREA_vcpu(r13)
+    lwz r3, VCPU_processor(r3)
+    LOADADDR r4, irq_stat
+    sldi r3, r3, IRQSTAT_shift
+    add r4, r3, r4
+    ld r5, IRQSTAT_pending(r4)
+    cmpldi r5, 0
+    beq hcall_out
+
+    /* we could use nonvolatile GPRs across do_softirq calls, but those are
+     * volatile across exceptions :( */
+    LOADADDR r6, ppc_do_softirq
+    mfmsr r3                            /* we pass this MSR to _do_softirq so
+                                         * it can give it to us back without
+                                         * having to save it */
+    ori r8, r3, MSR_EE
+
+    mtmsrd r8                           /* enable interrupts */
+    CALL_CFUNC r6                       /* process softirqs returns r3 */
+    mtmsrd r3                           /* disable interrupts */
+    b hcall_test_all_events                   /* look for more */
+hcall_out:     
     addi r1, r1, STACK_FRAME_OVERHEAD   /* restore stack to cpu_user_regs */
     b fast_resume
+
 
 ex_dec_continued:
     EXCEPTION_SAVE_STATE r1



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

<Prev in Thread] Current Thread [Next in Thread>