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 for-8.1] target/arm: Special case M-profile in debug_helper.c code
Date: Sat, 22 Jul 2023 15:06:34 +0100 [thread overview]
Message-ID: <d433a38a-ffe5-fb2d-faa4-6b537aecfdf9@linaro.org> (raw)
In-Reply-To: <20230721143239.1753066-1-peter.maydell@linaro.org>
On 7/21/23 15:32, Peter Maydell wrote:
> A lot of the code called from helper_exception_bkpt_insn() is written
> assuming A-profile, but we will also call this helper on M-profile
> CPUs when they execute a BKPT insn. This used to work by accident,
> but recent changes mean that we will hit an assert when some of this
> code calls down into lower level functions that end up calling
> arm_security_space_below_el3(), arm_el_is_aa64(), and other functions
> that now explicitly assert that the guest CPU is not M-profile.
>
> Handle M-profile directly to avoid the assertions:
> * in arm_debug_target_el(), M-profile debug exceptions always
> go to EL1
> * in arm_debug_exception_fsr(), M-profile always uses the short
> format FSR (compare commit d7fe699be54b2, though in this case
> the code in arm_v7m_cpu_do_interrupt() does not need to
> look at the FSR value at all)
>
> Cc:qemu-stable@nongnu.org
> Resolves:https://gitlab.com/qemu-project/qemu/-/issues/1775
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
> Not sure exactly when this assert() got in (probably in the
> semi-recent refactorings for realm support), but it won't hurt
> to backport the fix even if the older QEMU doesn't assert().
> ---
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
prev parent reply other threads:[~2023-07-22 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 14:32 [PATCH for-8.1] target/arm: Special case M-profile in debug_helper.c code Peter Maydell
2023-07-22 14:06 ` Richard Henderson [this message]
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=d433a38a-ffe5-fb2d-faa4-6b537aecfdf9@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).