Fix VMX preemption timer migration. Add a selftest to ensure post migration both L1 and L2 VM observe the VMX preemption timer exit close to the original expiration deadline. Makarand Sonare (1): KVM: selftests: VMX preemption timer migration test Peter Shier (1): KVM: nVMX: Fix VMX preemption timer migration Documentation/virt/kvm/api.rst | 4 + arch/x86/include/uapi/asm/kvm.h | 2 + arch/x86/kvm/vmx/nested.c | 61 ++++- arch/x86/kvm/vmx/vmx.h | 1 + arch/x86/kvm/x86.c | 3 +- include/uapi/linux/kvm.h | 1 + tools/arch/x86/include/uapi/asm/kvm.h | 3 + tools/testing/selftests/kvm/.gitignore | 1 + tools/testing/selftests/kvm/Makefile | 1 + .../testing/selftests/kvm/include/kvm_util.h | 2 + .../selftests/kvm/include/x86_64/processor.h | 11 +- .../selftests/kvm/include/x86_64/vmx.h | 27 ++ .../kvm/x86_64/vmx_preemption_timer_test.c | 256 ++++++++++++++++++ 13 files changed, 362 insertions(+), 11 deletions(-) create mode 100644 tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c -- 2.26.2.761.g0e0b3e54be-goog