summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw@amazon.co.uk>2026-06-04 10:35:17 +0100
committerThomas Gleixner <tglx@kernel.org>2026-06-05 14:25:03 +0200
commit19fa3e50644d2d47fca713b0df640f67dcd26634 (patch)
treeba00271d2fff0673940c4363270e1185e0378fdf /rust/kernel
parentc51100f9e26857f2b2376d5cd657a15f52b9e05c (diff)
x86/kvmclock: Implement read_snapshot() for kvmclock clocksource
Implement the read_snapshot() callback for the kvmclock clocksource. This returns the kvmclock nanosecond value (for timekeeping) while also providing the raw TSC value that was used to compute it. The TSC is read inside the pvclock seqlock-protected region, ensuring the raw TSC and derived kvmclock value are atomically paired. This enables ktime_get_snapshot_id() to provide the raw TSC to consumers like the vmclock PTP driver, which currently has to do a separate call to get_cycles() to obtain a value at *approximately* the same time, to feed through the vmclock calculation. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Assisted-by: Kiro:claude-opus-4.6-1m Link: https://patch.msgid.link/20260604095755.64849-3-dwmw2@infradead.org
Diffstat (limited to 'rust/kernel')
0 files changed, 0 insertions, 0 deletions