arm/gic: fix gic context switch
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 17 Jul 2012 16:22:04 +0000 (17:22 +0100)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Tue, 17 Jul 2012 16:22:04 +0000 (17:22 +0100)
gic_save/restore_state should also save and restore lr_mask and
event_mask too.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic.c
xen/include/asm-arm/domain.h

index ee83825761a2b07ceb55a6917b91ebc95e078d76..94b7ad77a44ef466c3cb972cd7cac2c9e0de32a2 100644 (file)
@@ -67,6 +67,8 @@ void gic_save_state(struct vcpu *v)
 
     for ( i=0; i<nr_lrs; i++)
         v->arch.gic_lr[i] = GICH[GICH_LR + i];
+    v->arch.lr_mask = gic.lr_mask;
+    v->arch.event_mask = gic.event_mask;
     /* Disable until next VCPU scheduled */
     GICH[GICH_HCR] = 0;
     isb();
@@ -79,6 +81,8 @@ void gic_restore_state(struct vcpu *v)
     if ( is_idle_vcpu(v) )
         return;
 
+    gic.lr_mask = v->arch.lr_mask;
+    gic.event_mask = v->arch.event_mask;
     for ( i=0; i<nr_lrs; i++)
         GICH[GICH_LR + i] = v->arch.gic_lr[i];
     GICH[GICH_HCR] = GICH_HCR_EN;
index 230ea8c09500cf65b1a478eb7e83600f9aa0aebb..3576d507a6a87fb55969874f388a6076a3cc0f5e 100644 (file)
@@ -121,6 +121,8 @@ struct arch_vcpu
 
     uint32_t gic_hcr, gic_vmcr, gic_apr;
     uint32_t gic_lr[64];
+    uint64_t event_mask;
+    uint64_t lr_mask;
 
     struct {
         /*