]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: arm64: nv: Allow userspace to de-feature stage-2 TGRANs
authorOliver Upton <oliver.upton@linux.dev>
Thu, 18 Sep 2025 16:55:05 +0000 (09:55 -0700)
committerMarc Zyngier <maz@kernel.org>
Fri, 19 Sep 2025 09:52:01 +0000 (10:52 +0100)
commit5aea4096380f5b14e3c0345bdafc291e9ae6d8d1
treed1ebf907ab2a3f46aea8ed8fbbd5589a626686b2
parentff37a41db8b47834b747b3bb427825fc75bc86a7
KVM: arm64: nv: Allow userspace to de-feature stage-2 TGRANs

KVM advertises the stage-2 TGRAN fields as writable to userspace but
prevents any modification for NV-enabled VMs. Update the special-cased
sanitization to permit de-featuring a particular TGRAN without allowing
the legacy value which refers to the stage-1 field for support.

Reported-by: Itaru Kitayama <itaru.kitayama@linux.dev>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c