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

Re: [Xen-devel] [PATCH 19/38] arm: context switch a bunch of guest state.



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<nr_lrs; 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<nr_lrs; 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.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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