summaryrefslogtreecommitdiff
path: root/tools/arch
diff options
context:
space:
mode:
authorOliver Upton <oupton@google.com>2021-09-16 18:15:38 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2021-10-18 14:43:45 -0400
commit828ca89628bfcb1b8f27535025f69dd00eb55207 (patch)
tree5197c686cff8825d4f994c864986a97bfa67b5aa /tools/arch
parent58d4277be9b66d8048054c8e57214a86b6b15da9 (diff)
KVM: x86: Expose TSC offset controls to userspace
To date, VMM-directed TSC synchronization and migration has been a bit messy. KVM has some baked-in heuristics around TSC writes to infer if the VMM is attempting to synchronize. This is problematic, as it depends on host userspace writing to the guest's TSC within 1 second of the last write. A much cleaner approach to configuring the guest's views of the TSC is to simply migrate the TSC offset for every vCPU. Offsets are idempotent, and thus not subject to change depending on when the VMM actually reads/writes values from/to KVM. The VMM can then read the TSC once with KVM_GET_CLOCK to capture a (realtime, host_tsc) pair at the instant when the guest is paused. Cc: David Matlack <dmatlack@google.com> Cc: Sean Christopherson <seanjc@google.com> Signed-off-by: Oliver Upton <oupton@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210916181538.968978-8-oupton@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/arch')
0 files changed, 0 insertions, 0 deletions