From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Peter Maydell <peter.maydell@linaro.org>,
Andrew Jones <drjones@redhat.com>
Cc: qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
"patches@linaro.org" <patches@linaro.org>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH for-2.12] hw/intc/arm_gicv3: Fix secure-GIC NS ICC_PMR and ICC_RPR accesses
Date: Thu, 22 Mar 2018 17:42:02 -0300 [thread overview]
Message-ID: <48f559bd-9f54-bcdd-1f3c-f6fafccfc54e@amsat.org> (raw)
In-Reply-To: <CAFEAcA8Vti8NnrQK4U4kLuk=nNMC5=KiKjc6wT7cLDnCHFj-8w@mail.gmail.com>
Hi Peter,
On 03/22/2018 03:29 PM, Peter Maydell wrote:
> On 22 March 2018 at 14:23, Andrew Jones <drjones@redhat.com> wrote:
>> On Thu, Mar 15, 2018 at 01:34:41PM +0000, Peter Maydell wrote:
>>> If the GIC has the security extension support enabled, then a
>>> non-secure access to ICC_PMR must take account of the non-secure
>>> view of interrupt priorities, where real priorities 0..0x7f
>>> are secure-only and not visible to the non-secure guest, and
>>> priorities 0x80..0xff are shown to the guest as if they were
>>> 0x00..0xff. We had the logic here wrong:
>>
>> 0x00..0x7f
>
> I think 0x00..0xff is correct.
I guess Andrew only suggested to correct the hex prefix in your comment:
- ... where real priorities 0..0x7f
+ ... where real priorities 0x00..0x7f
> The conversion from actual
> priority value to the NS-view is
> if (prio & 0x80 == 0) {
> nsview = 0;
> } else {
> nsview = (prio << 1) & 0xff;
> }
>
> so:
> real priority NS view
> 0x80 0x00
> 0x90 0x20
> 0xa0 0x40
> 0xb0 0x60
> 0xc0 0x80
> 0xd0 0xa0
> 0xe0 0xc0
> 0xf0 0xe0
>
> the NS view covers the whole 0x00..0xff range, but more sparsely.
> (OK, technically you can't ever read 0xff, only 0xfe.)
next prev parent reply other threads:[~2018-03-22 20:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 13:34 [Qemu-devel] [PATCH for-2.12] hw/intc/arm_gicv3: Fix secure-GIC NS ICC_PMR and ICC_RPR accesses Peter Maydell
2018-03-22 12:51 ` Peter Maydell
2018-03-22 14:23 ` Andrew Jones
2018-03-22 18:29 ` Peter Maydell
2018-03-22 20:42 ` Philippe Mathieu-Daudé [this message]
2018-03-23 9:45 ` [Qemu-devel] [Qemu-arm] " Peter Maydell
2018-03-23 10:08 ` Andrew Jones
2018-03-23 2:23 ` [Qemu-devel] " Philippe Mathieu-Daudé
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=48f559bd-9f54-bcdd-1f3c-f6fafccfc54e@amsat.org \
--to=f4bug@amsat.org \
--cc=drjones@redhat.com \
--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).