aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2014-10-26 19:18:14 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2015-01-20 12:25:27 -0500
commit4ce7ebdfc69d1d5d166eec103ed2976eb45a6173 (patch)
treed0033372ccdd1c40ccbb8b622e8999794e0fadf7 /virt
parentea2f83a7de9d0abbd145e37177905aab57fdb835 (diff)
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 <andre.przywara@arm.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/arm/vgic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 69f6e7aa573e..1c3b75eb28f0 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)
2094 2094
2095 mutex_lock(&kvm->lock); 2095 mutex_lock(&kvm->lock);
2096 2096
2097 if (kvm->arch.vgic.vctrl_base) { 2097 if (irqchip_in_kernel(kvm)) {
2098 ret = -EEXIST; 2098 ret = -EEXIST;
2099 goto out; 2099 goto out;
2100 } 2100 }