]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: nVMX: Update vmcs12 for MSR_IA32_CR_PAT when it's written
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 7 May 2019 16:06:35 +0000 (09:06 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 18 Jun 2019 09:47:36 +0000 (11:47 +0200)
commit142e4be77bc629802599d7c94f413759bca1c185
tree44dd22a945f7aa771f8273d1ec638866826617e5
parenta49700b66e3523947f0e19c761891cc7c510d9fb
KVM: nVMX: Update vmcs12 for MSR_IA32_CR_PAT when it's written

As alluded to by the TODO comment, KVM unconditionally intercepts writes
to the PAT MSR.  In the unlikely event that L1 allows L2 to write L1's
PAT directly but saves L2's PAT on VM-Exit, update vmcs12 when L2 writes
the PAT.  This eliminates the need to VMREAD the value from vmcs02 on
VM-Exit as vmcs12 is already up to date in all situations.

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