Skip to contentSkip to conversation

KVM: arm64: vgic-v3: Trap all if no in-kernel irqchip

PATCH Applied Sascha Bischoff 4 participants 4 messages Oct 21, 2025 – Oct 30, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: arm64: vgic-v3: Trap all if no in-kernel irqchip

If there is no in-kernel irqchip for a GICv3 host set all of the trap bits to block all accesses. This fixes the no-vgic-v3 selftest again.

Fixes 3193287ddffb ("KVM: arm64: gic-v3: Only set ICH_HCR traps for v2-on-v3 or v3 guests")
---
 arch/arm64/kvm/vgic/vgic-v3.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kvm/vgic/vgic-v3.c +2 -1
index 6fbb4b099855..2f75ef14d339 100644
@@ -301,7 +301,8 @@ void vcpu_set_ich_hcr(struct kvm_vcpu *vcpu)
 		return;
 
 	/* Hide GICv3 sysreg if necessary */
-	if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2) {
+	if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2 ||
+	    !irqchip_in_kernel(vcpu->kvm)) {
 		vgic_v3->vgic_hcr |= (ICH_HCR_EL2_TALL0 | ICH_HCR_EL2_TALL1 |
 				      ICH_HCR_EL2_TC);
 		return;
Signature · 1 line
2.34.1
Tested-by on v1 1/1
#1 lore raw
Quoted 2 lines · Sascha Bischoff

If there is no in-kernel irqchip for a GICv3 host set all of the trap bits to block all accesses. This fixes the no-vgic-v3 selftest again.

Reviewed-by on v1 1/1
#2 lore raw
In reply to Sascha Bischoff
Quoted 7 lines · Sascha Bischoff

If there is no in-kernel irqchip for a GICv3 host set all of the trap bits to block all accesses. This fixes the no-vgic-v3 selftest again.

Fixes 3193287ddffb ("KVM: arm64: gic-v3: Only set ICH_HCR traps for v2-on-v3 or v3 guests")
maintainer Applied
#3 lore raw
In reply to Sascha Bischoff
Quoted 4 lines · Sascha Bischoff

If there is no in-kernel irqchip for a GICv3 host set all of the trap bits to block all accesses. This fixes the no-vgic-v3 selftest again.

Applied to fixes, thanks!

[1/1] KVM: arm64: vgic-v3: Trap all if no in-kernel irqchip

      commit: da888524c393b4a14727e1a821bdd51313d0a2d3

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.