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] hw/misc/tz-mpc: Fix value of BLK_MAX register
Date: Thu, 13 Dec 2018 16:02:48 -0600 [thread overview]
Message-ID: <090c809e-bdf5-37a4-ef80-d03abd44ec9d@linaro.org> (raw)
In-Reply-To: <20181213183249.3468-1-peter.maydell@linaro.org>
On 12/13/18 12:32 PM, Peter Maydell wrote:
> In the TZ Memory Protection Controller, the BLK_MAX register is supposed
> to return the maximum permitted value of the BLK_IDX register. Our
> implementation incorrectly returned max+1 (ie the total number of
> valid index values, since BLK_IDX is zero-based).
>
> Correct this off-by-one error. Since we consistently initialize
> and use s->blk_max throughout the implementation as the 'size'
> of the LUT, just adjust the value we return when the guest reads
> the BLK_MAX register, rather than trying to change the semantics
> of the s->blk_max internal struct field.
>
> Fixes: https://bugs.launchpad.net/qemu/+bug/1806824
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/misc/tz-mpc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
prev parent reply other threads:[~2018-12-13 22:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 18:32 [Qemu-devel] [PATCH] hw/misc/tz-mpc: Fix value of BLK_MAX register Peter Maydell
2018-12-13 22:02 ` 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=090c809e-bdf5-37a4-ef80-d03abd44ec9d@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).