Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: arm64: Enable nested for GICv5 host with FEAT_GCIE_LEGACY

Extend the NV check to pass for a GICv5 host that has
FEAT_GCIE_LEGACY. The has_gcie_v3_compat flag is only set on GICv5
hosts (that explicitly support FEAT_GCIE_LEGACY), and hence the
explicit check for a VGIC_V5 is omitted.

As of this change, vGICv3-based VMs can run with nested on a
compatible GICv5 host.

Signed-off-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>

authored by

Sascha Bischoff and committed by
Marc Zyngier
d5a012af 9664d581

+3 -2
+3 -2
arch/arm64/kvm/arm.c
··· 2315 2315 } 2316 2316 2317 2317 if (kvm_mode == KVM_MODE_NV && 2318 - !(vgic_present && kvm_vgic_global_state.type == VGIC_V3)) { 2319 - kvm_err("NV support requires GICv3, giving up\n"); 2318 + !(vgic_present && (kvm_vgic_global_state.type == VGIC_V3 || 2319 + kvm_vgic_global_state.has_gcie_v3_compat))) { 2320 + kvm_err("NV support requires GICv3 or GICv5 with legacy support, giving up\n"); 2320 2321 err = -EINVAL; 2321 2322 goto out; 2322 2323 }