Hi Peter,

Peter Maydell <peter.mayd...@linaro.org> says:
On Thu, 14 Nov 2024 at 16:59, Pavel Skripkin <paskrip...@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 <paskrip...@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 via email to