From: Ricardo Koller <ricarkol@google.com>
To: Eric Auger <eric.auger@redhat.com>
Cc: Reiji Watanabe <reijiw@google.com>,
kvm@vger.kernel.org, kvmarm@lists.linux.dev,
andrew.jones@linux.dev, maz@kernel.org, alexandru.elisei@arm.com,
oliver.upton@linux.dev
Subject: Re: [kvm-unit-tests PATCH v3 3/4] arm: pmu: Add tests for 64-bit overflows
Date: Wed, 25 Jan 2023 06:17:09 -0800 [thread overview]
Message-ID: <Y9E55cTs+iAK31ns@google.com> (raw)
In-Reply-To: <12974616-10ac-e44b-7bd2-0db68fb63eb5@redhat.com>
On Wed, Jan 25, 2023 at 08:55:50AM +0100, Eric Auger wrote:
> Hi,
>
> On 1/25/23 05:11, Reiji Watanabe wrote:
> > On Tue, Jan 24, 2023 at 6:19 PM Ricardo Koller <ricarkol@google.com> wrote:
> >> On Wed, Jan 18, 2023 at 09:58:38PM -0800, Reiji Watanabe wrote:
> >>> Hi Ricardo,
> >>>
> >>> On Mon, Jan 9, 2023 at 1:18 PM Ricardo Koller <ricarkol@google.com> wrote:
> >>>> @@ -898,12 +913,12 @@ static void test_overflow_interrupt(bool overflow_at_64bits)
> >>>>
> >>>> pmu_reset_stats();
> >>> This isn't directly related to the patch.
> >>> But, as bits of pmovsclr_el0 are already set (although interrupts
> >>> are disabled), I would think it's good to clear pmovsclr_el0 here.
> >>>
> >>> Thank you,
> >>> Reiji
> >>>
> >> There's no need in this case as there's this immediately before the
> >> pmu_reset_stats();
> >>
> >> report(expect_interrupts(0), "no overflow interrupt after counting");
> >>
> >> so pmovsclr_el0 should be clear.
> > In my understanding, it means that no overflow *interrupt* was reported,
> > as the interrupt is not enabled yet (pmintenset_el1 is not set).
> > But, (as far as I checked the test case,) the both counters should be
> > overflowing here. So, pmovsclr_el0 must be 0x3.
>
> I would tend to agree with Reiji. The PMOVSSET_EL0<idx> will impact the
> next test according to aarch64/debug/pmu/AArch64.CheckForPMUOverflow and
> I think the overflow reg should be reset.
Ahh, right. The overflow interrupt could fire as soon as they are
enabled again. OK, will add a fix in the next version.
>
> Eric
> >
> > Or am I misunderstanding something?
> >
> > Thank you,
> > Reiji
> >
> >
> >>>> - write_regn_el0(pmevcntr, 0, PRE_OVERFLOW);
> >>>> - write_regn_el0(pmevcntr, 1, PRE_OVERFLOW);
> >>>> + write_regn_el0(pmevcntr, 0, pre_overflow);
> >>>> + write_regn_el0(pmevcntr, 1, pre_overflow);
> >>>> write_sysreg(ALL_SET, pmintenset_el1);
> >>>> isb();
> >>>>
>
next prev parent reply other threads:[~2023-01-25 14:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 21:17 [kvm-unit-tests PATCH v3 0/4] arm: pmu: Add support for PMUv3p5 Ricardo Koller
2023-01-09 21:17 ` [kvm-unit-tests PATCH v3 1/4] arm: pmu: Fix overflow checks for PMUv3p5 long counters Ricardo Koller
2023-01-09 21:42 ` Oliver Upton
2023-01-23 20:16 ` Eric Auger
2023-01-09 21:17 ` [kvm-unit-tests PATCH v3 2/4] arm: pmu: Prepare for testing 64-bit overflows Ricardo Koller
2023-01-12 5:56 ` Reiji Watanabe
2023-01-13 15:20 ` Ricardo Koller
2023-01-09 21:17 ` [kvm-unit-tests PATCH v3 3/4] arm: pmu: Add tests for " Ricardo Koller
2023-01-19 5:58 ` Reiji Watanabe
2023-01-24 15:11 ` Ricardo Koller
2023-01-25 2:19 ` Ricardo Koller
2023-01-25 4:11 ` Reiji Watanabe
2023-01-25 7:55 ` Eric Auger
2023-01-25 14:17 ` Ricardo Koller [this message]
2023-01-23 20:33 ` Eric Auger
2023-01-24 15:26 ` Ricardo Koller
2023-01-24 20:15 ` Eric Auger
2023-01-26 16:45 ` Ricardo Koller
2023-01-09 21:17 ` [kvm-unit-tests PATCH v3 4/4] arm: pmu: Print counter values as hexadecimals Ricardo Koller
2023-01-09 21:43 ` Oliver Upton
2023-01-23 20:17 ` Eric Auger
2023-01-25 4:37 ` Reiji Watanabe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9E55cTs+iAK31ns@google.com \
--to=ricarkol@google.com \
--cc=alexandru.elisei@arm.com \
--cc=andrew.jones@linux.dev \
--cc=eric.auger@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=reijiw@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox