]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Merge branch 'ptp-vmclock-add-vm-generation-counter-and-acpi-notification'
authorJakub Kicinski <kuba@kernel.org>
Tue, 3 Feb 2026 02:06:02 +0000 (18:06 -0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Feb 2026 02:06:03 +0000 (18:06 -0800)
commit74ad1dfe2335df7c1fd36139261c2fba6bcaea40
tree7ea3bf188ab00d58af414ecd44794e18061011c8
parent8755aae4aa7569f079135a0590dbd0f7adcfacf4
parent562f59fe32914a10af8554634866bd0b56257060
Merge branch 'ptp-vmclock-add-vm-generation-counter-and-acpi-notification'

Takahiro Itazuri says:

====================
ptp: vmclock: Add VM generation counter and ACPI notification

Similarly to live migration, starting a VM from some serialized state
(aka snapshot) is an event which calls for adjusting guest clocks, hence
a hypervisor should increase the disruption_marker before resuming the
VM vCPUs, letting the guest know.

However, loading a snapshot, is slightly different than live migration,
especially since we can start multiple VMs from the same serialized
state. Apart from adjusting clocks, the guest needs to take additional
action during such events, e.g. recreate UUIDs, reset network
adapters/connections, reseed entropy pools, etc. These actions are not
necessary during live migration. This calls for a differentiation
between the two triggering events.

We differentiate between the two events via an extra field in the
vmclock_abi, called vm_generation_counter. Whereas hypervisors should
increase the disruption marker in both cases, they should only increase
vm_generation_counter when a snapshot is loaded in a VM (not during live
migration).

Additionally, we attach an ACPI notification to VMClock. Implementing
the notification is optional for the device. VMClock device will declare
that it implements the notification by setting
VMCLOCK_FLAG_NOTIFICATION_PRESENT bit in vmclock_abi flags. Hypervisors
that implement the notification must send an ACPI notification every
time seq_count changes to an even number. The driver will propagate
these notifications to userspace via the poll() interface.
====================

Link: https://patch.msgid.link/20260130173704.12575-1-itazur@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>