[kvm-unit-tests PATCH] x86/pmu: Disable inlining of measure()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 25, 2022 at 4:12 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> On Tue, Oct 25, 2022, Bill Wendling wrote:
> > On Wed, Jun 1, 2022 at 10:22 AM Jim Mattson <jmattson@xxxxxxxxxx> wrote:
> > >
> > > On Wed, Jun 1, 2022 at 9:30 AM Bill Wendling <morbo@xxxxxxxxxx> wrote:
> > > >
> > > > From: Bill Wendling <isanbard@xxxxxxxxx>
> > > >
> > > > Clang can be more aggressive at inlining than GCC and will fully inline
> > > > calls to measure(). This can mess with the counter overflow check. To
> > > > set up the PMC overflow, check_counter_overflow() first records the
> > > > number of instructions retired in an invocation of measure() and checks
> > > > to see that subsequent calls to measure() retire the same number of
> > > > instructions. If inlining occurs, those numbers can be different and the
> > > > overflow test fails.
> > > >
> > > >   FAIL: overflow: cntr-0
> > > >   PASS: overflow: status-0
> > > >   PASS: overflow: status clear-0
> > > >   PASS: overflow: irq-0
> > > >   FAIL: overflow: cntr-1
> > > >   PASS: overflow: status-1
> > > >   PASS: overflow: status clear-1
> > > >   PASS: overflow: irq-1
> > > >   FAIL: overflow: cntr-2
> > > >   PASS: overflow: status-2
> > > >   PASS: overflow: status clear-2
> > > >   PASS: overflow: irq-2
> > > >   FAIL: overflow: cntr-3
> > > >   PASS: overflow: status-3
> > > >   PASS: overflow: status clear-3
> > > >   PASS: overflow: irq-3
> > > >
> > > > Disabling inlining of measure() keeps the assumption that all calls to
> > > > measure() retire the same number of instructions.
> > > >
> > > > Cc: Jim Mattson <jmattson@xxxxxxxxxx>
> > > > Signed-off-by: Bill Wendling <morbo@xxxxxxxxxx>
> > > Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>
> >
> > Bumping for visibility.
>
> Heh, make sure kvm-unit-tests is in the subject, i.e. [kvm-unit-tests PATCH].
> This slipped by on my end because I didn't realize at a quick glance that it was
> touching KVM-unit-tests and not kernel code.

Doh! I'm not sure why I forgot that. Added. Thanks. :)

-bw



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux