Skip to content

Time resync support by qemu-ga

Lei Li qemu-devel 4 versions – Applied

Status from this message: Thanks, applied to qga branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesApplied
  2. v42 patches 5 repliesSuperseded
  3. v32 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC3 patches21 repliesSuperseded

Changes in v5 from the cover letter

- Fix the missing error exit pointed by Eric.
- Doc improvement from Eric.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/2qga: add guest-get-time commandqga/commands-posix.c qga/qapi-schema.json+29 -00 replies
2/2qga: add guest-set-time commandqga/commands-posix.c qga/qapi-schema.json+81 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric Blake
SeriesR-b
1/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [Qemu-devel] [PATCH 0/2 v5] Time resync support by qemu-ga

This patch series attempts to add time resync support to qemu-ga by introducing qemu-ga commands guest-get-time and guest-set-time.

Right now, when a guest is paused or migrated to a file then loaded from that file, the guest OS has no idea that there was a big gap in the time. Depending on how long the gap was, NTP might not be able to resynchronize the guest. So adding new guest-agent command that is called any time a guest is resumed and which tells the guest to update its own wall clock time based on the information from the host will make it easier for a guest to resynchronize without waiting for NTP.

The previous RFC send for discussion and suggestion as link here:

http://article.gmane.org/gmane.comp.emulators.qemu/186126

The interface for these commands like:

{ 'command': 'guest-get-time', 'returns': 'int' }

{ 'command': 'guest-set-time', 'data': { 'time': int } }

Notes:
For the implementition of win32-specific commands, I plan to send it out in another thread later.

Suggestions and comments are welcome!

Changes since v4:
- Fix the missing error exit pointed by Eric.
- Doc improvement from Eric.

Changes since v3:
- Doc improvement based on Eric's suggestions.
- Overflow check improve from Eric.

Changes since v2:
- Get rid of utc-offset, and make it just pass single nanoseconds relative to the Epoch in UTC/GMT according to Anthony and Eric's comments.
- Make time argument mandatory.
- Fix the overflow check for year-2038 problem.
- Error handel improvment from Eric.

Changes since v1:
- Squashed patches add support to get host time and add guest-get-time command into one.
- Documents improvment based on the suggestions from Eric and Mike.
- Change the name of 'HostTimeInfo' to 'TimeInfo'.
- Better use-case and logic for 'guest-set-time' command suggested by Eric.
- Error handel improvment from Luiz.

Lei Li (2):
qga: add guest-get-time command
qga: add guest-set-time command