KVM: nVMX: Use adjusted pin controls for vmcs02
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 7 May 2019 19:17:53 +0000 (12:17 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Jun 2019 09:47:40 +0000 (11:47 +0200)
commitc075c3e49d7ae3599106f1af53352268030469db
tree378a5e654d199b68194169a2133ee165cfc672b6
parentc7554efc83355150c91d8097f26a3c99d58ad53d
KVM: nVMX: Use adjusted pin controls for vmcs02

KVM provides a module parameter to allow disabling virtual NMI support
to simplify testing (hardware *without* virtual NMI support is hard to
come by but it does have users).  When preparing vmcs02, use the accessor
for pin controls to ensure that the module param is respected for nested
guests.

Opportunistically swap the order of applying L0's and L1's pin controls
to better align with other controls and to prepare for a future patche
that will ignore L1's, but not L0's, preemption timer flag.

Fixes: d02fcf50779ec ("kvm: vmx: Allow disabling virtual NMI support")
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h