]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: arm64: Always populate FGT masks at boot time
authorMarc Zyngier <maz@kernel.org>
Thu, 22 Jan 2026 08:51:53 +0000 (08:51 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 22 Jan 2026 08:59:52 +0000 (08:59 +0000)
commit54adbfe40e3b6d238293cc36ef071ed9f35c8af7
treeb10e614a456048e2839c3bbebec9de584137de2d
parent80cbfd7174f31010982f065e8ae73bf337992105
KVM: arm64: Always populate FGT masks at boot time

We currently only populate the FGT masks if the underlying HW does
support FEAT_FGT. However, with the addition of the RES1 support for
system registers, this results in a lot of noise at boot time, as
reported by Nathan.

That's because even if FGT isn't supported, we still check for the
attribution of the bits to particular features, and not keeping the
masks up-to-date leads to (fairly harmess) warnings.

Given that we want these checks to be enforced even if the HW doesn't
support FGT, enable the generation of FGT masks unconditionally (this
is rather cheap anyway). Only the storage of the FGT configuration is
avoided, which will save a tiny bit of memory on these machines.

Reported-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Fixes: c259d763e6b09 ("KVM: arm64: Account for RES1 bits in DECLARE_FEAT_MAP() and co")
Link: https://lore.kernel.org/r/20260120211558.GA834868@ax162
Link: https://patch.msgid.link/20260122085153.535538-1-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/emulate-nested.c