linux-stable/arch
Oliver Upton 828ca89628 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>
2021-10-18 14:43:45 -04:00
..
alpha alpha: enable GENERIC_PCI_IOMAP unconditionally 2021-09-19 10:37:00 -07:00
arc Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
arm entry: rseq: Call rseq_handle_notify_resume() in tracehook_notify_resume() 2021-09-22 10:24:01 -04:00
arm64 Merge commit 'kvm-pagedata-alloc-fixes' into HEAD 2021-10-18 14:13:37 -04:00
csky entry: rseq: Call rseq_handle_notify_resume() in tracehook_notify_resume() 2021-09-22 10:24:01 -04:00
h8300 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
hexagon Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
ia64 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
m68k m68k: mvme: Remove overdue #warnings in RTC handling 2021-09-13 11:19:05 +02:00
microblaze Microblaze patches for 5.15-rc1 2021-09-08 16:02:13 -07:00
mips kvm: rename KVM_MAX_VCPU_ID to KVM_MAX_VCPU_IDS 2021-09-30 04:27:05 -04:00
nds32 nds32/setup: remove unused memblock_region variable in setup_memory() 2021-09-08 18:45:53 -07:00
nios2 Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
openrisc Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
parisc parisc: Declare pci_iounmap() parisc version only when CONFIG_PCI enabled 2021-09-19 10:36:09 -07:00
powerpc kvm: rename KVM_MAX_VCPU_ID to KVM_MAX_VCPU_IDS 2021-09-30 04:27:05 -04:00
riscv RISC-V: KVM: Add SBI v0.1 support 2021-10-04 16:11:30 +05:30
s390 KVM: s390: Function documentation fixes 2021-09-28 17:56:54 +02:00
sh sh: Add missing FORCE prerequisites in Makefile 2021-09-19 10:13:42 +09:00
sparc dma-mapping fixes for Linux 5.15 2021-09-17 11:54:48 -07:00
um This pull request contains the following changes for UML: 2021-09-09 13:45:26 -07:00
x86 KVM: x86: Expose TSC offset controls to userspace 2021-10-18 14:43:45 -04:00
xtensa Tracing updates for 5.15: 2021-09-05 11:50:41 -07:00
.gitignore
Kconfig Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00