Skip to content

Add support for VMClock device with snapshot safety features #5575

@bchalios

Description

@bchalios

VMClock device is a virtual device that [1]

allows the hypervisor to synchronise the hardware clock against external time, and simply present the results to each guest in a shared memory region in the form of a formula for converting the CPU counter into real time. This allows guests to have precision timestamps even immediately after a Live Migration event, and with no need to provide further clock devices to the guest or for guests to spend their own CPU time on calibration

Moreover,

For guests which do perform their own additional refinement of the clock via NTP or other means, a disruption signal is provided which allows them to discard any such refinement after Live Migration, and start again with the data from the new hypervisor host.

The disruption signal of VMClock is mainly thought out for Live Migration events, but clock disruption also occurs in snapshot events. During the latter, apart for adjusting clocks, guests might want to perform other adjustments such as recreating UUIDs, resetting network connections, reseeding entropy pools, etc. These events are not needed during Live Migration. As a result, we are extending the device upstream [2], so that we add a separate signal for snapshot events.

As part of this issue, we will implement the existing VMClock functionality as well as the snapshot safety extensions.

[1] https://david.woodhou.se/VMClock.pdf
[2] https://lore.kernel.org/lkml/[email protected]/

Metadata

Metadata

Assignees

Labels

Roadmap: TrackedItems tracked on the roadmap project.Status: WIPIndicates that an issue is currently being worked on or triagedType: EnhancementIndicates new feature requests

Type

No type

Projects

Status

We're Working On It

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions