From: Ian Campbell Subject: Re: [PATCH 2/5] arm/gic: fix gic context switch Date: Tue, 26 Jun 2012 14:55:43 +0100 Message-ID: <1340718943.3832.121.camel@zakaz.uk.xensource.com> References: <1338981730-14816-1-git-send-email-stefano.stabellini@eu.citrix.com> <1338981730-14816-2-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1338981730-14816-2-git-send-email-stefano.stabellini@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , David Vrabel , "Tim Deegan (3P)" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-06-06 at 12:22 +0100, Stefano Stabellini wrote: > gic_save/restore_state should also save and restore lr_mask and > event_mask too. > > Signed-off-by: Stefano Stabellini Acked-by: Ian Campbell > --- > xen/arch/arm/gic.c | 4 ++++ > xen/include/asm-arm/domain.h | 2 ++ > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c > index 3f9a061..c73f274 100644 > --- a/xen/arch/arm/gic.c > +++ b/xen/arch/arm/gic.c > @@ -67,6 +67,8 @@ void gic_save_state(struct vcpu *v) > > for ( i=0; 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 GICH[GICH_LR + i] = v->arch.gic_lr[i]; > GICH[GICH_HCR] = GICH_HCR_EN; > diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h > index 230ea8c..3576d50 100644 > --- a/xen/include/asm-arm/domain.h > +++ b/xen/include/asm-arm/domain.h > @@ -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 { > /*