KVM: nSVM: Don't initialize vmcb02 MSRPM with vmcb01's "always passthrough"
authorSean Christopherson <seanjc@google.com>
Tue, 10 Jun 2025 22:57:17 +0000 (15:57 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:07:24 +0000 (13:07 -0700)
commit4879dc9469e6d54d1199b3c53f7c16c891d9004f
tree7a0a3061a323b553764d77fcd0cb9849b5c48c43
parentf21ff2c8c997e5f209e7165456f447293907a9a8
KVM: nSVM: Don't initialize vmcb02 MSRPM with vmcb01's "always passthrough"

Don't initialize vmcb02's MSRPM with KVM's set of "always passthrough"
MSRs, as KVM always needs to consult L1's intercepts, i.e. needs to merge
vmcb01 with vmcb12 and write the result to vmcb02.  This will eventually
allow for the removal of svm_vcpu_init_msrpm().

Note, the bitmaps are truly initialized by svm_vcpu_alloc_msrpm() (default
to intercepting all MSRs), e.g. if there is a bug lurking elsewhere, the
worst case scenario from dropping the call to svm_vcpu_init_msrpm() should
be that KVM would fail to passthrough MSRs to L2.

Link: https://lore.kernel.org/r/20250610225737.156318-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h