KVM: arm64: vgic-v3: Trap all if no in-kernel irqchip
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")
Reported-by Mark Brown <[email protected]>
Signed-off-by Sascha Bischoff <[email protected]>
--- arch/arm64/kvm/vgic/vgic-v3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kvm/vgic/vgic-v3.c +2 -1
@@ -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
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.
Tested-by Mark Brown <[email protected]>
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")Reported-by Mark Brown <[email protected]>Signed-off-by Sascha Bischoff <[email protected]>
Reviewed-by Sebastian Ott <[email protected]>
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.