qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level
Date: Mon, 21 Nov 2022 20:02:34 +0100	[thread overview]
Message-ID: <CAMj1kXG_AcmtvEKBUCX8eAsSv7xasGc0HAvQDSnu7ByMie5W9Q@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA_Tz1an8cJO_6kDozMQ1kpqzu60gKq+c4Rj1veFz0REpg@mail.gmail.com>

On Mon, 21 Nov 2022 at 19:51, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Mon, 21 Nov 2022 at 17:43, Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > The LPA2 extension implements 52-bit virtual addressing for 4k and 16k
> > translation granules, and for the former, this means an additional level
> > of translation is needed. This means we start counting at -1 instead of
> > 0 when doing a walk, and so 'level' is now a signed quantity, and should
> > be typed as such. So turn it from uint32_t into int32_t.
> >
>
> Does this cause any visible wrong behaviour, or is it just
> a cleanup thing ?
>

No, 5 level paging is completely broken because of this, given that
the 'level < 3' tests give the wrong result for (uint32_t)-1


  reply	other threads:[~2022-11-21 19:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 17:43 [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level Ard Biesheuvel
2022-11-21 18:51 ` Peter Maydell
2022-11-21 19:02   ` Ard Biesheuvel [this message]
2022-11-22 13:20     ` Peter Maydell
2022-11-22 15:49       ` Ard Biesheuvel

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=CAMj1kXG_AcmtvEKBUCX8eAsSv7xasGc0HAvQDSnu7ByMie5W9Q@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.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).