Re: [PATCH v3 0/2] KVM: arm64: Force HCR_EL2.NV1 to RES0 unconditionally

From: Marc Zyngier

Date: Thu Nov 19 2026 - 07:43:56 EST


On Wed, 18 Nov 2026 20:36:23 +0000, Colton Lewis wrote:
> When commit b2a324ff01fe ("KVM: arm64: Use HCR_EL2 feature map to drive
> fixed-value bits") migrated HCR_EL2 fixed-bit masking to hcr_feat_map[],
> feat_nv2_e2h0_ni() was written as !kvm_has_feat(kvm, FEAT_E2H0). Because
> ID_AA64MMFR4_EL1.E2H0 is a signed 4-bit field where IMP is 0, NI is -1,
> and NI_NV1 is -2, !kvm_has_feat(kvm, FEAT_E2H0) evaluates to true when
> E2H0 < 0 (including NI_NV1), leaving HCR_EL2.NV1 writable instead of
> RES0 for VHE-only nested guests where KVM advertises E2H0 = NI_NV1.
>
> [...]

Applied to fixes, thanks!

[1/2] KVM: arm64: Force HCR_EL2.NV1 to RES0 unconditionally
commit: 0f1bdabb82be5d1b5401364cd828caf0985dad48
[2/2] KVM: arm64: selftests: Verify HCR_EL2.NV1 is RES0 when E2H0 is NI_NV1
commit: accc93b77267b739b48ab34cb5bcaffd1fbb5db9

Cheers,

M.
--
Without deviation from the norm, progress is not possible.