From: Ian Campbell Subject: Re: [PATCH 19/38] arm: context switch a bunch of guest state. Date: Wed, 6 Jun 2012 16:19:29 +0100 Message-ID: <1338995969.32319.139.camel@zakaz.uk.xensource.com> References: <1338565113.17466.141.camel@zakaz.uk.xensource.com> <1338565207-2888-1-git-send-email-ian.campbell@citrix.com> <1338565207-2888-19-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-06-05 at 18:11 +0100, Stefano Stabellini wrote: > On Fri, 1 Jun 2012, Ian Campbell wrote: > > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c > > index 1a2b95f..339c327 100644 > > --- a/xen/arch/arm/gic.c > > +++ b/xen/arch/arm/gic.c > > @@ -61,6 +61,30 @@ static struct { > > irq_desc_t irq_desc[NR_IRQS]; > > unsigned nr_lrs; > > > > +void gic_save_state(struct vcpu *v) > > +{ > > + int i; > > + > > + for ( i=0; i > + v->arch.gic_lr[i] = GICH[GICH_LR + i]; > > + /* Disable until next VCPU scheduled */ > > + GICH[GICH_HCR] = 0; > > + isb(); > > +} > > + > > +void gic_restore_state(struct vcpu *v) > > +{ > > + int i; > > + > > + if ( is_idle_vcpu(v) ) > > + return; > > + > > + for ( i=0; i > + GICH[GICH_LR + i] = v->arch.gic_lr[i]; > > + GICH[GICH_HCR] = GICH_HCR_EN; > > + isb(); > > +} > > + > > it is still missing a bunch of stuff from the gic state but it is a step > in the right direction, so I'll send out patches to complete the gic > context switch separately, based on this one. Can I take this as an Ack for this patch for what it does? Ian.