qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Skripkin <paskripkin@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] arm/ptw: respect sctlr.{u}wxn in get_phys_addr_v6
Date: Fri, 15 Nov 2024 19:54:48 +0300	[thread overview]
Message-ID: <6303c5ee-e6f9-48f7-9cd4-f78680c2e785@gmail.com> (raw)
In-Reply-To: <CAFEAcA9i+YmGj5tznoc9FQkDQKqN4vx_0grOjh_ZFGyj-aPgng@mail.gmail.com>

Hi Peter,

Peter Maydell <peter.maydell@linaro.org> says:
> On Thu, 14 Nov 2024 at 16:59, Pavel Skripkin <paskripkin@gmail.com> wrote:
>>
>> get_phys_addr_v6() is used for decoding armv7's short descriptor format.
>> Based on ARM ARM AArch32.S1SDHasPermissionsFault(), WXN should be
>> respected in !LPAE mode as well.
>>
>> Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
>> ---
>>  target/arm/ptw.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
> 
> Instead of this, would it be possible to have get_phys_addr_v6()
> call get_S1prot() (replacing most of the existing open-coded
> handling of PAN, simple vs classing AP model, etc) ? I haven't
> looked at the fine detail, so we might need to tweak get_S1prot()
> if it's missing logic that only matters in the short-descriptor
> case, but I think that would be better than having two places
> that need updating for new architectural features.
> 

I also thought about that, but suspected there was a reason it was not 
used at the first place.

Will take a look, if it's possible.

> For instance, we are also missing the handling for SCR.SIF with
> short descriptors which you can see in the S1SDHasPermissionsFault()
> pseudocode and which we would get if we could make the
> short-descriptor code call get_S1Prot().
> 
> Couple of minor notes for v2:
>   * if you're sending a multi-patch patchset, please use a
>     cover-letter email. Some of our automated tooling gets
>     confused by multi-patch patches without cover letters
>     (and, conversely, by single-patches with cover letters)
>   * our coding style says all if() statements should have
>     braces, even for single-line bodies
> 


Thanks for guidance!



With regards,
Pavel Skripkin


  reply	other threads:[~2024-11-15 16:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 16:59 [PATCH 1/2] arm/ptw: factor out wxn logic to separate functions Pavel Skripkin
2024-11-14 16:59 ` Pavel Skripkin
2024-11-14 16:59 ` [PATCH 2/2] arm/ptw: respect sctlr.{u}wxn in get_phys_addr_v6 Pavel Skripkin
2024-11-15 13:22   ` Peter Maydell
2024-11-15 16:54     ` Pavel Skripkin [this message]
2024-11-15 17:08       ` Peter Maydell

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=6303c5ee-e6f9-48f7-9cd4-f78680c2e785@gmail.com \
    --to=paskripkin@gmail.com \
    --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).