Skip to content
Commit 00073e2c authored by Jim Mattson's avatar Jim Mattson Committed by Sean Christopherson
Browse files

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: default avatarJim 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: default avatarSean Christopherson <seanjc@google.com>
parent 7b2e4176
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment