summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFuad Tabba <fuad.tabba@linux.dev>2026-10-12 17:15:22 +0100
committerMarc Zyngier <maz@kernel.org>2026-10-26 07:44:46 +0000
commitfb77bb2a0ff253e6c370ec7dc1afa45b2ecd8d2e (patch)
tree1c550bbc22d8f99903b5f7d5e20eff11767be834 /scripts
parent121d74bee8cd81ce9212837db98ceaef2e530637 (diff)
downloadlinux-fb77bb2a0ff253e6c370ec7dc1afa45b2ecd8d2e.tar.gz
linux-fb77bb2a0ff253e6c370ec7dc1afa45b2ecd8d2e.zip
KVM: arm64: Validate the host-provided vgic model in pKVM
EL2 copies vgic_model from the host's struct kvm unchecked, and the nVHE world switch dispatches on it with no cpucap guard. A host writing KVM_DEV_TYPE_ARM_VGIC_V5 makes EL2 access GICv5 CPU interface registers that are UNDEFINED without FEAT_GCIE, and panics the hypervisor on any GICv3 machine. Accept only GICv3, the one model pKVM supports, and force anything else to 0, as for a VM with no in-kernel irqchip. EL2 reads the model only to pick the GICv5 world switch and to emulate GICv3 CPU interface accesses, and the host's own copy is left alone. Fixes: 9b8e3d4ca0e73 ("KVM: arm64: gic-v5: Implement GICv5 load/put and save/restore") Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20261012161524.4016464-4-fuad.tabba@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions