Skip to content

Commit 83c6cb2

Browse files
Marc Zyngieroupton
authored andcommitted
KVM: arm64: nv: Fail KVM init if asking for NV without GICv3
Although there is nothing in NV that is fundamentally incompatible with the lack of GICv3, there is no HW implementation without one, at least on the virtual side (yes, even fruits have some form of vGICv3). We therefore make the decision to require GICv3, which will only affect models such as QEMU. Booting with a GICv2 or something even more exotic while asking for NV will result in KVM being disabled. Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20250225172930.1850838-17-maz@kernel.org Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent faf7714 commit 83c6cb2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/arm64/kvm/arm.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,6 +2325,13 @@ static int __init init_subsystems(void)
23252325
goto out;
23262326
}
23272327

2328+
if (kvm_mode == KVM_MODE_NV &&
2329+
!(vgic_present && kvm_vgic_global_state.type == VGIC_V3)) {
2330+
kvm_err("NV support requires GICv3, giving up\n");
2331+
err = -EINVAL;
2332+
goto out;
2333+
}
2334+
23282335
/*
23292336
* Init HYP architected timer support
23302337
*/

0 commit comments

Comments
 (0)