qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH 2/3] target/arm: Make writes to MDCR_EL3 use PMU start/finish calls
Date: Wed, 28 Sep 2022 05:15:25 -0700	[thread overview]
Message-ID: <b4934613-e1a4-e6a8-58cf-dfe91d19a01f@linaro.org> (raw)
In-Reply-To: <20220923123412.1214041-3-peter.maydell@linaro.org>

On 9/23/22 05:34, Peter Maydell wrote:
> In commit 01765386a88868 we fixed a bug where we weren't correctly
> bracketing changes to some registers with pmu_op_start() and
> pmu_op_finish() calls for changes which affect whether the PMU
> counters might be enabled.  However, we missed the case of writes to
> the AArch64 MDCR_EL3 register, because (unlike its AArch32
> counterpart) they are currently done directly to the CPU state struct
> without going through the sdcr_write() function.
> 
> Give MDCR_EL3 a writefn which handles the PMU start/finish calls.
> The SDCR writefn then simplfies to "call the MDCR_EL3 writefn after
> masking off the bits which don't exist in the AArch32 register".
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   target/arm/helper.c | 18 ++++++++++++++----
>   1 file changed, 14 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2022-09-28 14:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 12:34 [PATCH 0/3] target/arm: Fix bugs in recent PMU changes Peter Maydell
2022-09-23 12:34 ` [PATCH 1/3] target/arm: Mark registers which call pmu_op_start() as ARM_CP_IO Peter Maydell
2022-09-28 12:11   ` Richard Henderson
2022-09-23 12:34 ` [PATCH 2/3] target/arm: Make writes to MDCR_EL3 use PMU start/finish calls Peter Maydell
2022-09-28 12:15   ` Richard Henderson [this message]
2022-09-23 12:34 ` [PATCH 3/3] target/arm: Update SDCR_VALID_MASK to include SCCD Peter Maydell
2022-09-28 12:16   ` 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=b4934613-e1a4-e6a8-58cf-dfe91d19a01f@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.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;
as well as URLs for NNTP newsgroup(s).