From: Andre Przywara Date: Sun, 26 Oct 2014 23:18:14 +0000 (+0000) Subject: arm/arm64: KVM: dont rely on a valid GICH base address X-Git-Tag: v5.15~16338^2~37^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4ce7ebdfc69d1d5d166eec103ed2976eb45a6173;p=platform%2Fkernel%2Flinux-starfive.git arm/arm64: KVM: dont rely on a valid GICH base address To check whether the vGIC was already initialized, we currently check the GICH base address for not being NULL. Since with GICv3 we may get along without this address, lets use the irqchip_in_kernel() function to detect an already initialized vGIC. Signed-off-by: Andre Przywara Acked-by: Christoffer Dall Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall --- diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c index 69f6e7a..1c3b75e 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -2094,7 +2094,7 @@ int kvm_vgic_create(struct kvm *kvm, u32 type) mutex_lock(&kvm->lock); - if (kvm->arch.vgic.vctrl_base) { + if (irqchip_in_kernel(kvm)) { ret = -EEXIST; goto out; }