]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: always allow host-initiated writes to PMU MSRs
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 25 May 2022 08:39:22 +0000 (04:39 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:48:40 +0000 (04:48 -0400)
commit217ed595e7c4e09dad53a65effdb18540904124d
treebe0105851a384baec1e10ca214286743eb9e28f8
parent384e12627090d7578658dc190f59d0ec14f7f74f
KVM: x86: always allow host-initiated writes to PMU MSRs

Whenever an MSR is part of KVM_GET_MSR_INDEX_LIST, it has to be always
retrievable and settable with KVM_GET_MSR and KVM_SET_MSR.  Accept
the PMU MSRs unconditionally in intel_is_valid_msr, if the access was
host-initiated.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/pmu.c
arch/x86/kvm/pmu.h
arch/x86/kvm/svm/pmu.c
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/x86.c