]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Ignore benign host accesses to "unsupported" PEBS and BTS MSRs
authorSean Christopherson <seanjc@google.com>
Sat, 11 Jun 2022 00:57:54 +0000 (00:57 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 20 Jun 2022 15:50:26 +0000 (11:50 -0400)
commit595d65d8dd7bb9b222150c60f14db41720c620db
treef34f3aae9198f2ddae0eef37b347989494fc100c
parent0e8d985f3c3599c05da8d22378932c64b879c5c1
KVM: x86: Ignore benign host accesses to "unsupported" PEBS and BTS MSRs

Ignore host userspace reads and writes of '0' to PEBS and BTS MSRs that
KVM reports in the MSR-to-save list, but the MSRs are ultimately
unsupported.  All MSRs in said list must be writable by userspace, e.g.
if userspace sends the list back at KVM without filtering out the MSRs it
doesn't need.

Fixes: 0bff66da5fca ("KVM: x86/pmu: Add IA32_DS_AREA MSR emulation to support guest DS")
Fixes: e04a03139ab6 ("KVM: x86/pmu: Add PEBS_DATA_CFG MSR emulation to support adaptive PEBS")
Fixes: 56a759afcfa5 ("KVM: x86/pmu: Add IA32_PEBS_ENABLE MSR emulation for extended PEBS")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220611005755.753273-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c