|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC v2 1/6] xen/arm: Save and restore support with hvm context hypercalls
On 05/13/2014 05:44 PM, Wei Huang wrote:
> On 05/13/2014 11:37 AM, Julien Grall wrote:
>> On 05/13/2014 05:18 PM, Wei Huang wrote:
>>> Given the comments from you and Andrew, I will revise the context struct
>>> to the following format. With this, we can get rid of most problems
>>> (switch/case/...).
>>
>> With this solution, you will duplicate code to save/restore the timer.
> The code size will be reduced and looks cleaner? Here is the example:
LGTM except ...
> static int hvm_timer_save(struct domain *d, hvm_domain_context_t *h)
> {
> struct hvm_arm_timer ctxt;
> struct vcpu *v;
> int rc = 0;
>
> /* Save the state of vtimer and ptimer */
> for_each_vcpu( d, v )
> {
> /* save phys_timer */
> ctxt.phys_cval = v->arch.phys_timer.cval;
> ctxt.phys_ctl = v->arch.phys_timer.ctl;
> ctxt.phys_vtb_offset = d->arch.phys_timer_base.offset;
>
> /* save virt_timer */
> ctxt.virt_cval = v->arch.virt_timer.cval;
> ctxt.virt_ctl = v->arch.virt_timer.ctl;
> ctxt.virt_vtb_offset = d->arch.virt_timer_base.offset;
I think you need to store d->arch.virt_timer_base.offset in ns rather
than ticks.
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |