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

Re: [Xen-devel] [PATCH V2] x86/hvm: fix saved pmtimer value



Hi,

At 15:06 +0900 on 10 Sep (1441897575), Kouya Shimura wrote:
> The ACPI PM timer is sometimes broken on live migration.
> Since vcpu->arch.hvm_vcpu.guest_time is always zero in other than
> "delay for missed ticks mode". Even in "delay for missed ticks mode",
> vcpu's guest_time field is not valid (i.e. zero) when
> the state of vcpu is "blocked". (see pt_save_timer function)

Nice catch, thanks!

> The original author (Tim Deegan) of pmtimer_save() must have
> intended that it saves the last scheduled time of the
> vcpu. Unfortunately it was already implied this bug. FYI, there is
> no other timer mode than "delay for missed ticks mode" then.  For
> consistency with HPET, pmtimer_save() should refer
> hvm_get_guest_time() to update the counter as well as hpet_save()
> does.

Using hvm_get_guest_time() here means the guest will see a time jump
for the delay between being paused and the HVM state being saved.
OTOH, fixing it so that this always uses the pause time (e.g. by
making pt_freeze_time() always save the time as it used to) means the
guest will see a time difference between PMTIMER and other HVM state
(e.g. HPET).

So I think this change is fine.  But please update the comment right
above it that talks about using the saved time!

Cheers,

Tim.

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