]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: nVMX: Disable PMU MSR interception as appropriate while running L2
authorMingwei Zhang <mizhang@google.com>
Sat, 6 Dec 2025 00:17:07 +0000 (16:17 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 8 Jan 2026 19:52:14 +0000 (11:52 -0800)
commit88ebc2a3199cb5f16aff20673ed97b63a4295989
tree0f7481514212252b15fe62a9e74fc8474ff1450b
parentcb58327c4c8ad9e81d3a2f17adaf3ab57066f369
KVM: nVMX: Disable PMU MSR interception as appropriate while running L2

Merge KVM's PMU MSR interception bitmaps with those of L1, i.e. merge the
bitmaps of vmcs01 and vmcs12, e.g. so that KVM doesn't interpose on MSR
accesses unnecessarily if L1 exposes a mediated PMU (or equivalent) to L2.

Signed-off-by: Mingwei Zhang <mizhang@google.com>
Co-developed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
[sean: rewrite changelog and comment, omit MSRs that are always intercepted]
Tested-by: Xudong Hao <xudong.hao@intel.com>
Tested-by: Manali Shukla <manali.shukla@amd.com>
Link: https://patch.msgid.link/20251206001720.468579-32-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/nested.c