mbox series

[kvm-unit-tests,0/4] x86/pmu: PEBS fixes and new testcases

Message ID 20240306230153.786365-1-seanjc@google.com (mailing list archive)
Headers show
Series x86/pmu: PEBS fixes and new testcases | expand

Message

Sean Christopherson March 6, 2024, 11:01 p.m. UTC
One bug fix where pmu_pebs attempts to enable PEBS for fixed counter on
CPUs without Extended PEBS, and two new testcases to verify adaptive
PEBS functionality.

The new testcases are intended both to demonstrate that adaptive PEBS
virtualization is currently broken, and to serve as a gatekeeper for
re-enabling adapative PEBS in the future.

https://lore.kernel.org/all/ZeepGjHCeSfadANM@google.com

Sean Christopherson (4):
  x86/pmu: Enable PEBS on fixed counters iff baseline PEBS is support
  x86/pmu: Iterate over adaptive PEBS flag combinations
  x86/pmu: Test adaptive PEBS without any adaptive counters
  x86/pmu: Add a PEBS test to verify the host LBRs aren't leaked to the
    guest

 lib/x86/pmu.h  |   6 ++-
 x86/pmu_pebs.c | 109 +++++++++++++++++++++++++++----------------------
 2 files changed, 66 insertions(+), 49 deletions(-)


base-commit: 55dd01b4f066577b49f03fb7146723c4a65822c4

Comments

Mi, Dapeng March 7, 2024, 9:22 a.m. UTC | #1
On 3/7/2024 7:01 AM, Sean Christopherson wrote:
> One bug fix where pmu_pebs attempts to enable PEBS for fixed counter on
> CPUs without Extended PEBS, and two new testcases to verify adaptive
> PEBS functionality.
>
> The new testcases are intended both to demonstrate that adaptive PEBS
> virtualization is currently broken, and to serve as a gatekeeper for
> re-enabling adapative PEBS in the future.
>
> https://lore.kernel.org/all/ZeepGjHCeSfadANM@google.com
>
> Sean Christopherson (4):
>    x86/pmu: Enable PEBS on fixed counters iff baseline PEBS is support
>    x86/pmu: Iterate over adaptive PEBS flag combinations
>    x86/pmu: Test adaptive PEBS without any adaptive counters
>    x86/pmu: Add a PEBS test to verify the host LBRs aren't leaked to the
>      guest
>
>   lib/x86/pmu.h  |   6 ++-
>   x86/pmu_pebs.c | 109 +++++++++++++++++++++++++++----------------------
>   2 files changed, 66 insertions(+), 49 deletions(-)

Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>

>
> base-commit: 55dd01b4f066577b49f03fb7146723c4a65822c4
Sean Christopherson June 5, 2024, 11:20 p.m. UTC | #2
On Wed, 06 Mar 2024 15:01:49 -0800, Sean Christopherson wrote:
> One bug fix where pmu_pebs attempts to enable PEBS for fixed counter on
> CPUs without Extended PEBS, and two new testcases to verify adaptive
> PEBS functionality.
> 
> The new testcases are intended both to demonstrate that adaptive PEBS
> virtualization is currently broken, and to serve as a gatekeeper for
> re-enabling adapative PEBS in the future.
> 
> [...]

Applied to kvm-x86 next.  Dapeng, I didn't address your feedback about adding
finer grained message prefixes.  I'm not opposed to doing so, I'm just extremely
short on cycles and want to get the fixes landed.

[1/4] x86/pmu: Enable PEBS on fixed counters iff baseline PEBS is support
      https://github.com/kvm-x86/kvm-unit-tests/commit/79aa106cd427
[2/4] x86/pmu: Iterate over adaptive PEBS flag combinations
      https://github.com/kvm-x86/kvm-unit-tests/commit/fc17d5276b38
[3/4] x86/pmu: Test adaptive PEBS without any adaptive counters
      https://github.com/kvm-x86/kvm-unit-tests/commit/2cb2af7f53db
[4/4] x86/pmu: Add a PEBS test to verify the host LBRs aren't leaked to the guest
      https://github.com/kvm-x86/kvm-unit-tests/commit/8d0f574f4e4d

--
https://github.com/kvm-x86/kvm-unit-tests/tree/next
Mi, Dapeng1 June 6, 2024, 12:51 a.m. UTC | #3
> -----Original Message-----
> From: Sean Christopherson <seanjc@google.com>
> Sent: Thursday, June 6, 2024 7:21 AM
> To: Sean Christopherson <seanjc@google.com>; Paolo Bonzini
> <pbonzini@redhat.com>
> Cc: kvm@vger.kernel.org; Like Xu <like.xu.linux@gmail.com>; Mingwei Zhang
> <mizhang@google.com>; Zhenyu Wang <zhenyuw@linux.intel.com>; Zhang,
> Xiong Y <xiong.y.zhang@intel.com>; Lv, Zhiyuan <zhiyuan.lv@intel.com>; Mi,
> Dapeng1 <dapeng1.mi@intel.com>
> Subject: Re: [kvm-unit-tests PATCH 0/4] x86/pmu: PEBS fixes and new testcases
> 
> On Wed, 06 Mar 2024 15:01:49 -0800, Sean Christopherson wrote:
> > One bug fix where pmu_pebs attempts to enable PEBS for fixed counter
> > on CPUs without Extended PEBS, and two new testcases to verify
> > adaptive PEBS functionality.
> >
> > The new testcases are intended both to demonstrate that adaptive PEBS
> > virtualization is currently broken, and to serve as a gatekeeper for
> > re-enabling adapative PEBS in the future.
> >
> > [...]
> 
> Applied to kvm-x86 next.  Dapeng, I didn't address your feedback about adding
> finer grained message prefixes.  I'm not opposed to doing so, I'm just extremely
> short on cycles and want to get the fixes landed.

It's fine. I think I can help to add it.