public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: vmx, pmu: respect KVM_GET_MSR_INDEX_LIST/KVM_SET_MSR contracts
@ 2022-05-31 17:54 Paolo Bonzini
  2022-05-31 17:54 ` [PATCH 1/2] KVM: vmx, pmu: accept 0 for absent MSRs when host-initiated Paolo Bonzini
  2022-05-31 17:54 ` [PATCH 2/2] KVM: x86: always allow host-initiated writes to PMU MSRs Paolo Bonzini
  0 siblings, 2 replies; 17+ messages in thread
From: Paolo Bonzini @ 2022-05-31 17:54 UTC (permalink / raw)
  To: linux-kernel, kvm; +Cc: likexu

Whenever an MSR is part of KVM_GET_MSR_INDEX_LIST, it has to be always
settable with KVM_SET_MSR.  Right now MSR_IA32_DS_AREA, MSR_ARCH_LBR_DEPTH
and MSR_ARCH_LBR_CTL are not fulfilling this, resulting in selftests
failures on <=Skylake processors.

Fix this, and in general allow host-initiated writes of a default
value for all PMU MSRs

Paolo Bonzini (2):
  KVM: vmx, pmu: accept 0 for absent MSRs when host-initiated
  KVM: x86: always allow host-initiated writes to PMU MSRs

 arch/x86/kvm/pmu.c           |  4 ++--
 arch/x86/kvm/pmu.h           |  4 ++--
 arch/x86/kvm/svm/pmu.c       |  2 +-
 arch/x86/kvm/vmx/pmu_intel.c | 42 +++++++++++++++++++++++++-----------
 arch/x86/kvm/x86.c           | 10 ++++-----
 5 files changed, 39 insertions(+), 23 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-06-16 15:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-31 17:54 [PATCH 0/2] KVM: vmx, pmu: respect KVM_GET_MSR_INDEX_LIST/KVM_SET_MSR contracts Paolo Bonzini
2022-05-31 17:54 ` [PATCH 1/2] KVM: vmx, pmu: accept 0 for absent MSRs when host-initiated Paolo Bonzini
2022-05-31 18:37   ` Sean Christopherson
2022-06-01  2:46     ` Like Xu
2022-06-01  8:50       ` Paolo Bonzini
2022-06-01 16:39       ` Sean Christopherson
2022-06-02  2:12         ` Like Xu
2022-06-15 18:52           ` Sean Christopherson
2022-06-16 10:37             ` Paolo Bonzini
2022-06-16 15:30               ` Sean Christopherson
2022-06-01  8:54     ` Paolo Bonzini
2022-06-01  9:12       ` Yang, Weijiang
2022-06-01 10:15         ` Paolo Bonzini
2022-06-01 10:42           ` Yang, Weijiang
2022-05-31 17:54 ` [PATCH 2/2] KVM: x86: always allow host-initiated writes to PMU MSRs Paolo Bonzini
2022-06-01  1:12   ` Like Xu
2022-06-08 22:22   ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox