qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH] target/arm: arm_pamax() no longer needs to do feature propagation
Date: Wed, 10 Jan 2024 04:11:55 +1100	[thread overview]
Message-ID: <c89b73e4-b966-48d9-867a-75acd74812bc@linaro.org> (raw)
In-Reply-To: <20240109143804.1118307-1-peter.maydell@linaro.org>

On 1/10/24 01:38, Peter Maydell wrote:
> In arm_pamax(), we need to cope with the virt board calling this
> function on a CPU object which has been inited but not realize.
> We used to do propagation of feature-flag implications (such as
> "V7VE implies LPAE") at realize, so we have some code in arm_pamax()
> which manually checks for both V7VE and LPAE feature flags.
> 
> In commit b8f7959f28c4f36 we moved the feature propagation for
> almost all features from realize to post-init. That means that
> now when the virt board calls arm_pamax(), the feature propagation
> has been done. So we can drop the manual propagation handling
> and check only for the feature we actually care about, which
> is ARM_FEATURE_LPAE.
> 
> Retain the comment that the virt board is calling this function
> with a not completely realized CPU object, because that is a
> potential beartrap for later changes which is worth calling out.
> 
> (Note that b8f7959f28c4f36 actually fixed a bug in the arm_pamax()
> handling: arm_pamax() was missing a check for ARM_FEATURE_V8, so it
> incorrectly thought that the qemu-system-arm 'max' CPU did not have
> LPAE and turned off 'highmem' support in the virt board.  Following
> b8f7959f28c4f36 qemu-system-arm 'max' is treated the same as
> 'cortex-a15' and other v7 LPAE CPUs, because the generic feature
> propagation code does correctly propagate V8 -> V7VE -> LPAE.)
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   target/arm/ptw.c | 14 ++++++--------
>   1 file changed, 6 insertions(+), 8 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


      reply	other threads:[~2024-01-09 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 14:38 [PATCH] target/arm: arm_pamax() no longer needs to do feature propagation Peter Maydell
2024-01-09 17:11 ` Richard Henderson [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=c89b73e4-b966-48d9-867a-75acd74812bc@linaro.org \
    --to=richard.henderson@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).