From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 01/10] target/arm: Don't corrupt high half of PMOVSR when cycle counter overflows
Date: Thu, 11 Aug 2022 10:41:16 -0700 [thread overview]
Message-ID: <12988a80-ff95-cb09-dd1d-a8745aa00885@linaro.org> (raw)
In-Reply-To: <20220811171619.1154755-2-peter.maydell@linaro.org>
On 8/11/22 10:16, Peter Maydell wrote:
> When the cycle counter overflows, we are intended to set bit 31 in PMOVSR
> to indicate this. However a missing ULL suffix means that we end up
> setting all of bits 63-31. Fix the bug.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target/arm/helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index d7bc467a2a5..87c89748954 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -1186,7 +1186,7 @@ static void pmccntr_op_start(CPUARMState *env)
> uint64_t overflow_mask = env->cp15.c9_pmcr & PMCRLC ? \
> 1ull << 63 : 1ull << 31;
> if (env->cp15.c15_ccnt & ~new_pmccntr & overflow_mask) {
> - env->cp15.c9_pmovsr |= (1 << 31);
> + env->cp15.c9_pmovsr |= (1ULL << 31);
> pmu_update_irq(env);
> }
>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2022-08-11 17:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 17:16 [PATCH 00/10] target/arm: Implement FEAT_PMUv3p5 Peter Maydell
2022-08-11 17:16 ` [PATCH 01/10] target/arm: Don't corrupt high half of PMOVSR when cycle counter overflows Peter Maydell
2022-08-11 17:41 ` Richard Henderson [this message]
2022-08-11 17:16 ` [PATCH 02/10] target/arm: Correct value returned by pmu_counter_mask() Peter Maydell
2022-08-11 17:42 ` Richard Henderson
2022-08-11 17:16 ` [PATCH 03/10] target/arm: Don't mishandle count when enabling or disabling PMU counters Peter Maydell
2022-08-11 17:44 ` Richard Henderson
2022-08-11 17:16 ` [PATCH 04/10] target/arm: Ignore PMCR.D when PMCR.LC is set Peter Maydell
2022-08-11 17:45 ` Richard Henderson
2022-08-11 17:16 ` [PATCH 05/10] target/arm: Honour MDCR_EL2.HPMD in Secure EL2 Peter Maydell
2022-08-11 17:48 ` Richard Henderson
2022-08-11 19:09 ` Peter Maydell
2022-08-11 17:16 ` [PATCH 06/10] target/arm: Detect overflow when calculating next PMU interrupt Peter Maydell
2022-08-11 17:51 ` Richard Henderson
2022-08-11 17:16 ` [PATCH 07/10] target/arm: Rename pmu_8_n feature test functions Peter Maydell
2022-08-11 17:53 ` Richard Henderson
2022-08-11 17:16 ` [PATCH 08/10] target/arm: Implement FEAT_PMUv3p5 cycle counter disable bits Peter Maydell
2022-08-20 17:33 ` Richard Henderson
2022-08-22 8:56 ` Peter Maydell
2022-08-11 17:16 ` [PATCH 09/10] target/arm: Support 64-bit event counters for FEAT_PMUv3p5 Peter Maydell
2022-08-20 18:54 ` Richard Henderson
2022-08-22 9:00 ` Peter Maydell
2022-08-11 17:16 ` [PATCH 10/10] target/arm: Report FEAT_PMUv3p5 for TCG '-cpu max' Peter Maydell
2022-08-11 17:26 ` Peter Maydell
2022-08-20 18:56 ` Richard Henderson
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=12988a80-ff95-cb09-dd1d-a8745aa00885@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).