public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: x86/pmu: Fix accesses to PMU MSRs in two corner cases
@ 2022-12-26 11:17 Like Xu
  2022-12-26 11:17 ` [PATCH 1/3] KVM: x86: Omit PMU MSRs from KVM_GET_MSR_INDEX_LIST if !enable_pmu Like Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Like Xu @ 2022-12-26 11:17 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Sean Christopherson, kvm, linux-kernel

When PMU is disabled globally, the msr_list reported by KVM will still
expose a not minor number of PMU msrs, patch 1 is a quick fix and
stable trees will be much needed. Note, a more maintenance-friendly
approach [1] suggested by Sean is certainly in the works, but users are
now in desperate need of a pill.

The second case is where the host user space of a low version PMU can
still see the higher version PMU features from the msr_list exposed by KVM,
and subsequent read and write access failures also causes KVM regression.
Note, a more thorough clean-up move is also in the development pipeline.

Please consider adding cc: stable to the first two patches so that further
refactoring of the same issues can be focused on upstream maintenance.

[1] https://lore.kernel.org/all/20220805172945.35412-4-seanjc@google.com/

Off-topic, two more independent KVM fixes also need to be reviewed:
- https://lore.kernel.org/kvm/20221109115952.92816-1-likexu@tencent.com/
- https://lore.kernel.org/kvm/20221205122048.16023-1-likexu@tencent.com/

Like Xu (3):
  KVM: x86: Omit PMU MSRs from KVM_GET_MSR_INDEX_LIST if !enable_pmu
  KVM: x86: Ignore host accesses to higher version PMU features MSRs
  KVM: x86: Fix a typo about msrs_to_save_all[] in kvm_init_msr_list()

 arch/x86/include/asm/kvm_host.h |  1 +
 arch/x86/kvm/x86.c              | 34 ++++++++++++++++++++++++++++++---
 2 files changed, 32 insertions(+), 3 deletions(-)

-- 
2.39.0


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

end of thread, other threads:[~2023-01-04 16:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-26 11:17 [PATCH 0/3] KVM: x86/pmu: Fix accesses to PMU MSRs in two corner cases Like Xu
2022-12-26 11:17 ` [PATCH 1/3] KVM: x86: Omit PMU MSRs from KVM_GET_MSR_INDEX_LIST if !enable_pmu Like Xu
2022-12-27  0:59   ` Yang, Weijiang
2022-12-27  2:18     ` Yang, Weijiang
2023-01-04 15:59     ` Sean Christopherson
2022-12-26 11:17 ` [PATCH 2/3] KVM: x86: Ignore host accesses to higher version PMU features MSRs Like Xu
2023-01-04 16:27   ` Sean Christopherson
2022-12-26 11:17 ` [PATCH 3/3] KVM: x86: Fix a typo about msrs_to_save_all[] in kvm_init_msr_list() Like Xu

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