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

Re: [Xen-devel] [RFC v3 3/6] xen/arm: Add save/restore support for ARM arch timer



On Sun, 2014-05-11 at 09:58 +0100, Julien Grall wrote:
> Hi Wei,
> 
> Thank you for the patch.
> 
> On 08/05/14 22:18, Wei Huang wrote:
> > +    switch ( ctxt.type )
> > +    {
> > +    case ARM_TIMER_TYPE_PHYS:
> > +        t = &v->arch.phys_timer;
> > +        d->arch.phys_timer_base.offset = ctxt.vtb_offset;
> > +        break;
> > +    case ARM_TIMER_TYPE_VIRT:
> > +        t = &v->arch.virt_timer;
> > +        d->arch.virt_timer_base.offset = ctxt.vtb_offset;
> 
> It seems you forgot to address some of my comments on the timer 
> save/restore.
> 
> Saving {virt,phys}_timer_base.offset per VCPU rather than per-domain 
> seems a waste of space and confusing.

Is it 100% inconceivable that two vcpus might some day have different
timers?

> Furthermore, this offset is used to get a relative offset from the Xen 
> timer counter. Migrating the guess to another server will invalidate the 
> value.

The correct architectural state to migrate is the time stamp as the
guest sees it, i.e. with the offset already applied. The receiving end
would then need to recalculate the correct offset based on its local
timer count.

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