]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: arm64: vgic-v3: Allow userspace to write GICD_TYPER2.nASSGIcap
authorRaghavendra Rao Ananta <rananta@google.com>
Thu, 24 Jul 2025 06:28:03 +0000 (23:28 -0700)
committerOliver Upton <oliver.upton@linux.dev>
Sat, 26 Jul 2025 15:45:52 +0000 (08:45 -0700)
commitc652887a92887b9a2d48ee40f49f8013449b9a50
treedd113cb72be5449b312257cab70c2b45b0505c4f
parentf26e6af75782fad6efdc883f33e1c40f1a6d37e7
KVM: arm64: vgic-v3: Allow userspace to write GICD_TYPER2.nASSGIcap

KVM unconditionally advertises GICD_TYPER2.nASSGIcap (which internally
implies vSGIs) on GICv4.1 systems. Allow userspace to change whether a
VM supports the feature. Only allow changes prior to VGIC initialization
as at that point vPEs need to be allocated for the VM.

For convenience, bundle support for vLPIs and vSGIs behind this feature,
allowing userspace to control vPE allocation for VMs in environments
that may be constrained on vPE IDs.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20250724062805.2658919-5-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic-init.c
arch/arm64/kvm/vgic/vgic-kvm-device.c
arch/arm64/kvm/vgic/vgic-mmio-v3.c
arch/arm64/kvm/vgic/vgic.h
include/kvm/arm_vgic.h