Skip to content

Commit bc44121

Browse files
Sean Christophersonbonzini
authored andcommitted
KVM: nVMX: Restore a preemption timer consistency check
A recently added preemption timer consistency check was unintentionally dropped when the consistency checks were being reorganized to match the SDM's ordering. Fixes: 461b4ba ("KVM: nVMX: Move the checks for VM-Execution Control Fields to a separate helper function") Cc: Krish Sadhukhan <krish.sadhukhan@oracle.com> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 6b1971c commit bc44121

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/kvm/vmx/nested.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2473,6 +2473,10 @@ static int nested_check_vm_execution_controls(struct kvm_vcpu *vcpu,
24732473
(nested_cpu_has_vpid(vmcs12) && !vmcs12->virtual_processor_id))
24742474
return -EINVAL;
24752475

2476+
if (!nested_cpu_has_preemption_timer(vmcs12) &&
2477+
nested_cpu_has_save_preemption_timer(vmcs12))
2478+
return -EINVAL;
2479+
24762480
if (nested_cpu_has_ept(vmcs12) &&
24772481
!valid_ept_address(vcpu, vmcs12->ept_pointer))
24782482
return -EINVAL;

0 commit comments

Comments
 (0)