[v3,0/3] KVM: x86/pmu: Enable guest PEBS for SPR and later models

Message ID 20221109082802.27543-1-likexu@tencent.com
Headers
Series KVM: x86/pmu: Enable guest PEBS for SPR and later models |

Message

Like Xu Nov. 9, 2022, 8:27 a.m. UTC
  Hi,

Finally, SPR will go live in early 2023. Virtualization support for SPR
PEBS (kvm.x86.vpmu.pebs_ept) has officially available in the Intel SDM
(June 2022), and this patch set is validated on a late stepping machine.

Let's see if this new revision will satisfy everyone's appetite.

Previous:
https://lore.kernel.org/kvm/20220922051929.89484-1-likexu@tencent.com/
V2 -> V3 Changelog:
- Add more commit message about the pdit/pdir stuff; (Sean)
- Refine confusing comments on event precise level and TNT+; (Sean)
- Use pmc_get_pebs_precise_level() instead of need_max_precise(); (Sean)
- Move HYBRID_CPU change in a separate patch; (Sean)
- Land KVM changes before perf core changes; (Sean)
- Aalign code indentation; (Sean) // VScode is quite good for kernel dev.

Like Xu (3):
  KVM: x86/pmu: Disable guest PEBS on hybird cpu due to heterogeneity
  KVM: x86/pmu: Add PRIR++ and PDist support for SPR and later models
  perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models

 arch/x86/events/intel/core.c    |  1 +
 arch/x86/events/intel/ds.c      |  4 ++-
 arch/x86/kvm/pmu.c              | 45 ++++++++++++++++++++++++---------
 arch/x86/kvm/vmx/capabilities.h |  4 ++-
 4 files changed, 40 insertions(+), 14 deletions(-)
  

Comments

Sean Christopherson Feb. 2, 2023, 1:32 a.m. UTC | #1
On Wed, 09 Nov 2022 16:27:59 +0800, Like Xu wrote:
> Finally, SPR will go live in early 2023. Virtualization support for SPR
> PEBS (kvm.x86.vpmu.pebs_ept) has officially available in the Intel SDM
> (June 2022), and this patch set is validated on a late stepping machine.
> 
> Let's see if this new revision will satisfy everyone's appetite.
> 
> Previous:
> https://lore.kernel.org/kvm/20220922051929.89484-1-likexu@tencent.com/
> V2 -> V3 Changelog:
> - Add more commit message about the pdit/pdir stuff; (Sean)
> - Refine confusing comments on event precise level and TNT+; (Sean)
> - Use pmc_get_pebs_precise_level() instead of need_max_precise(); (Sean)
> - Move HYBRID_CPU change in a separate patch; (Sean)
> - Land KVM changes before perf core changes; (Sean)
> - Aalign code indentation; (Sean) // VScode is quite good for kernel dev.
> 
> [...]

Applied 2-3 to kvm-x86 pmu.  I want to get Paolo's input before proceeding on
the whole "disable vPMU for Hybrid PMUs" snafu.  IIUC, applying these patches
won't make the situation worse, please holler if that's incorrect.

Thanks!

[2/3] KVM: x86/pmu: Add PRIR++ and PDist support for SPR and later models
      https://github.com/kvm-x86/linux/commit/974850be0125
[3/3] perf/x86/intel: Expose EPT-friendly PEBS for SPR and future models
      https://github.com/kvm-x86/linux/commit/13738a364736

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes