Re: [PATCH v2 1/2] KVM: arm64: Fix inverted E2H0 check for HCR_EL2.NV1

From: Colton Lewis

Date: Wed Nov 18 2026 - 15:35:32 EST


Marc Zyngier <maz@xxxxxxxxxx> writes:

> I really wonder why I bothered describing this, introducing a bug in
> the process. There is no known universe where we can deal with NV1 not
> being RES0, and this helper is purely academic (and therefore wrong).
>
> My personal take on this particular problem is as follows.
>
> - NEEDS_FEAT(HCR_EL2_NV1, feat_nv2_e2h0_ni), /* Missing from JSON */
> + NEEDS_FEAT_FLAG(HCR_EL2_NV1, FORCE_RESx), /* Missing from JSON, RES0 as an IMPDEF choice */

Makes sense. KVM never exposes a configuration where HCR_EL2.NV1 can be
non-RES0 anyway (either E2H0=NI_NV1 with VHE, where E2H0 is not
userspace-writable, or E2H0=IMP without FEAT_VHE/FEAT_NV).

I will adopt your simplification in v3 (with Suggested-by) and drop the
helper entirely, which also eliminates the confusing NI feature check
Oliver flagged.

-- Colton