From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: "Ard Biesheuvel" <ardb@kernel.org>,
qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH] target/arm: Limit LPA2 effective output address when TCR.DS == 0
Date: Thu, 17 Nov 2022 16:27:07 +0000 [thread overview]
Message-ID: <CAFEAcA8Bq12o7GYAG-4rTajBLwPtA0COMPxH1cPj4NYe_BzweQ@mail.gmail.com> (raw)
In-Reply-To: <9fa748c0-975a-09d9-4f09-942f18cc1a31@linaro.org>
On Thu, 17 Nov 2022 at 03:14, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 11/16/22 09:03, Ard Biesheuvel wrote:
> > diff --git a/target/arm/ptw.c b/target/arm/ptw.c
> > index 3745ac9723474332..9a6277d862fac229 100644
> > --- a/target/arm/ptw.c
> > +++ b/target/arm/ptw.c
> > @@ -1222,6 +1222,14 @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw,
> > ps = MIN(ps, param.ps);
> > assert(ps < ARRAY_SIZE(pamax_map));
> > outputsize = pamax_map[ps];
> > +
> > + /*
> > + * With LPA2, the effective output address (OA) size is at most 48 bits
> > + * unless TCR.DS == 1
> > + */
> > + if (!param.ds && param.gran != Gran64K) {
> > + outputsize = MIN(outputsize, 48);
> > + }
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
> I thought about moving this back into aa64_va_parameters, similar to how we bound tsz, but
> since this is the only use of param.ps, this placement is as good as any.
Applied to target-arm.next, thanks.
-- PMM
prev parent reply other threads:[~2022-11-17 16:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 17:03 [PATCH] target/arm: Limit LPA2 effective output address when TCR.DS == 0 Ard Biesheuvel
2022-11-17 3:14 ` Richard Henderson
2022-11-17 16:27 ` Peter Maydell [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=CAFEAcA8Bq12o7GYAG-4rTajBLwPtA0COMPxH1cPj4NYe_BzweQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=ardb@kernel.org \
--cc=f4bug@amsat.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).