All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2] target/arm: implement FEAT_E2H0
Date: Thu, 05 Feb 2026 12:23:02 +0000	[thread overview]
Message-ID: <877bsrnzvd.fsf@draig.linaro.org> (raw)
In-Reply-To: <3e6ab807-37df-40ba-840e-4693071691f7@linaro.org> (Richard Henderson's message of "Thu, 5 Feb 2026 07:43:40 +1000")

Richard Henderson <richard.henderson@linaro.org> writes:

> On 2/4/26 23:13, Alex Bennée wrote:
>> FEAT_E2H0 is a formalisation of the existing behaviour of HCR_EL2.E2H
>> being programmable to switch between EL2 host mode and the
>> "traditional" nVHE EL2 mode. This implies at some point we might want
>> to model CPUs without FEAT_E2H0 which will always have EL2 host mode
>> enabled.
>> There are two values to represent no E2H0 systems of which 0b1110
>> will
>> make HCR_EL2.NV1 RES0 for FEAT_NV systems. For FEAT_NV2 the NV1 bit is
>> always valid.
>> Message-ID: <20260130181648.628364-1-alex.bennee@linaro.org>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> v2
>>    - new helper and properly handling NV1
>> ---
<snip>
>
>> @@ -3801,10 +3802,13 @@ static void do_hcr_write(CPUARMState *env, uint64_t value, uint64_t valid_mask)
>>               valid_mask |= HCR_GPF;
>>           }
>>           if (cpu_isar_feature(aa64_nv, cpu)) {
>> -            valid_mask |= HCR_NV | HCR_NV1 | HCR_AT;
>> +            valid_mask |= HCR_NV | HCR_AT;
>> +            if (!cpu_isar_feature(aa64_noe2h0_and_nv1_res0, cpu)) {
>> +                valid_mask |= HCR_NV1;
>> +            }
>>           }
>>           if (cpu_isar_feature(aa64_nv2, cpu)) {
>> -            valid_mask |= HCR_NV2;
>> +            valid_mask |= HCR_NV1 | HCR_NV2;
>
> Why add NV1 here?

My reading was if you had FEAT_NV2 then HCR_NV1 was always valid
whatever E2H0 might say. Unless we can validate we don't get
contradictory ID values elsewhere?

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2026-02-05 12:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 13:13 [PATCH v2] target/arm: implement FEAT_E2H0 Alex Bennée
2026-02-04 15:55 ` Mohamed Mediouni
2026-02-04 21:43 ` Richard Henderson
2026-02-05 12:23   ` Alex Bennée [this message]
2026-02-05 13:02     ` Mohamed Mediouni
2026-02-05 20:57       ` Alex Bennée

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=877bsrnzvd.fsf@draig.linaro.org \
    --to=alex.bennee@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.