[libvirt] [PATCH v3] qemu: Issue rtc-reset-reinjection command after guest-set-time

Eric Blake eblake at redhat.com
Wed Aug 20 12:13:32 UTC 2014


On 08/20/2014 02:10 AM, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1103245
> 
> An advice appeared there on the qemu-devel list [1]. When a domain is
> suspended and then resumed guest kernel is not aware of this. So we've
> introduced virDomainSetTime API that resets the time within guest
> using qemu-ga. On the other hand, qemu itself is trying to make RTC
> beat faster to catch the difference. But if we don't tell qemu that
> guest's time was reset via the other method, both mechanisms are
> applied resulting in again wrong guest time. In order to avoid summing
> both corrections we need to tell qemu that it should not use the RTC
> injection if the guest time is set via guest agent.
> 
> 1: http://www.mail-archive.com/qemu-devel@nongnu.org/msg236435.html
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> 
> Notes:
>     diff to v2:
>     -introduced capability to test if qemu supports the monitor command

ACK.


> +
> +/**
> + * qemuMonitorRTCResetReinjection:
> + * @mon: Pointer to the monitor
> + *
> + * Issue rtc-reset-reinjection command.
> + * This should be used in cases where guest time is restored via
> + * guest agent so RTC injection is not needed (in fact it will

s/agent/agent,/
s/will/would/

> + * confuse guest's RTC).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140820/1af3dd5f/attachment-0001.sig>


More information about the libvir-list mailing list