[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.4] xen/arm: Call context_saved() with interrupts enabled during context switch



commit c756224f797038966da09f0e8f642967971e79cc
Author:     denys drozdov <denys.drozdov@xxxxxxxxxxxxxxx>
AuthorDate: Wed Feb 4 19:13:05 2015 +0200
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jun 22 10:15:51 2015 +0100

    xen/arm: Call context_saved() with interrupts enabled during context switch
    
    This is a requirement of the scheduler interface, violating this
    causes for example with the RT scheduler:
    
    (XEN) Assertion 'local_irq_is_enabled()' failed at spinlock.c:137
    (XEN) ----[ Xen-4.5.0  arm32  debug=y  Not tainted ]----
    (XEN) CPU:    0
    (XEN) PC:     0022a074 _spin_lock_irq+0x18/0x94
    
    (XEN) Xen call trace:
    (XEN)    [<0022a074>] _spin_lock_irq+0x18/0x94 (PC)
    (XEN)    [<002256b8>] rt_context_saved+0x3c/0x144 (LR)
    (XEN)    [<002256b8>] rt_context_saved+0x3c/0x144
    (XEN)    [<00228ed8>] context_saved+0x4c/0x80
    (XEN)    [<002524b4>] schedule_tail+0x148/0x2f0
    (XEN)    [<00252668>] continue_new_vcpu+0xc/0x70
    (XEN)    [<00252a18>] context_switch+0x74/0x7c
    
    Signed-off-by: denys drozdov <denys.drozdov@xxxxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Reviewed-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
    Reviewed-by: Julien Grall <julien.grall@xxxxxxxxxx>
    (cherry picked from commit e8bb583bec290a4f903cf065814af33ce49d4d0b)
    
    Conflicts:
        xen/arch/arm/domain.c
---
 xen/arch/arm/domain.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
index 67de12a..d39669f 100644
--- a/xen/arch/arm/domain.c
+++ b/xen/arch/arm/domain.c
@@ -131,7 +131,6 @@ static void ctxt_switch_from(struct vcpu *p)
     gic_save_state(p);
 
     isb();
-    context_saved(p);
 }
 
 static void ctxt_switch_to(struct vcpu *n)
@@ -231,6 +230,8 @@ static void schedule_tail(struct vcpu *prev)
 
     local_irq_enable();
 
+    context_saved(prev);
+
     if ( prev != current )
         update_runstate_area(current);
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.