]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Fix VMX preemption timer migration
authorPeter Shier <pshier@google.com>
Tue, 26 May 2020 21:51:06 +0000 (14:51 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Jun 2020 08:26:10 +0000 (04:26 -0400)
commitc6d93846be1b4257769d069542f4ba0576c7161b
treea47f2d1d880e70bb4fe7cf989b9dcc32aa699b42
parent46abf6236f4646d7176f8acc4ef716799ad5c961
KVM: nVMX: Fix VMX preemption timer migration

Add new field to hold preemption timer expiration deadline
appended to struct kvm_vmx_nested_state_hdr. This is to prevent
the first VM-Enter after migration from incorrectly restarting the timer
with the full timer value instead of partially decayed timer value.
KVM_SET_NESTED_STATE restarts timer using migrated state regardless
of whether L1 sets VM_EXIT_SAVE_VMX_PREEMPTION_TIMER.

Fixes: cb44a75069183 ("kvm: nVMX: Prepare for checkpointing L2 state")
Signed-off-by: Peter Shier <pshier@google.com>
Signed-off-by: Makarand Sonare <makarandsonare@google.com>
Message-Id: <20200526215107.205814-2-makarandsonare@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virt/kvm/api.rst
arch/x86/include/uapi/asm/kvm.h
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.h