x86: VMX: Fix the VMX-preemption timer expiration test
When the VMX-preemption timer fires between the test for "vmx_get_test_stage() == 0" and the subsequent rdtsc instruction, the final VM-entry to finish the guest will inadvertently update vmx_preemption_timer_expiry_finish. Move the code to finish the guest until after the calculations involving vmx_preemption_timer_expiry_finish are done, so that it doesn't matter if vmx_preemption_timer_expiry_finish is clobbered. Signed-off-by:Jim Mattson <jmattson@google.com> Fixes: b49a1a6d ("x86: VMX: Add a VMX-preemption timer expiration test") Link: https://lore.kernel.org/r/20220629025634.666085-1-jmattson@google.com Signed-off-by:
Sean Christopherson <seanjc@google.com>
Loading
Please register or sign in to comment