From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] target/arm: v8M MPU should use background region as default, not always
Date: Sun, 17 Feb 2019 09:49:48 -0800 [thread overview]
Message-ID: <32ee50a4-f8cd-ffce-6b42-4611611b2e34@linaro.org> (raw)
In-Reply-To: <20190214113408.10214-1-peter.maydell@linaro.org>
On 2/14/19 3:34 AM, Peter Maydell wrote:
> The "background region" for a v8M MPU is a default which will be used
> (if enabled, and if the access is privileged) if the access does
> not match any specific MPU region. We were incorrectly using it
> always (by putting the condition at the wrong nesting level). This
> meant that we would always return the default background permissions
> rather than the correct permissions for a specific region, and also
> that we would not return the right information in response to a
> TT instruction.
>
> Move the check for the background region to the same place in the
> logic as the equivalent v8M MPUCheck() pseudocode puts it.
> This in turn means we must adjust the condition we use to detect
> matches in multiple regions to avoid false-positives.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I found this because the incorrect TT response eventually resulted
> in the Zephyr RTOS writing an invalid region number back to the
> NVIC and tripping the guest_errors logging.
> ---
> target/arm/helper.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
prev parent reply other threads:[~2019-02-17 17:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 11:34 [Qemu-devel] [PATCH] target/arm: v8M MPU should use background region as default, not always Peter Maydell
2019-02-17 17:49 ` 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=32ee50a4-f8cd-ffce-6b42-4611611b2e34@linaro.org \
--to=richard.henderson@linaro.org \
--cc=patches@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).