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

Re: [Xen-devel] [PATCH RFC 3/4] Implement save and restore for gic (template impl)



> > +static int gic_save(struct domain *d, hvm_domain_context_t *h)
> > +{
> > +    struct hvm_hw_gic ctxt;
> > +    struct vcpu *v;
> > +
> > +    /* Save the state of GICs */
> > +    for_each_vcpu( d, v )
> > +    {
> > +        ctxt.gic_hcr = v->arch.gic_hcr;
> > +        ctxt.gic_vmcr = v->arch.gic_vmcr;
> > +        ctxt.gic_apr = v->arch.gic_apr;
> > +        memcpy( ctxt.gic_lr, v->arch.gic_lr, sizeof(v->arch.gic_lr) );
> > +        ctxt.event_mask = v->arch.event_mask;
> > +        ctxt.lr_mask = v->arch.lr_mask;
> 
> In general on x86 the policy is that hvm headers should store only
> architectural state. I think this is a good policy to carry over to ARM.
> 
> With that in mind I don't think either event_mask or lr_mask are
> architectural state but are actually internal state of the vgic
> "emulation" which can and should be reconstructed when loading the
> architectural state.

Thanks! That is very helpful :)

Jaeyong
_______________________________________________
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®.