浏览代码

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>
Andre Przywara 10 年之前
父节点
当前提交
4ce7ebdfc6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      virt/kvm/arm/vgic.c

+ 1 - 1
virt/kvm/arm/vgic.c

@@ -2094,7 +2094,7 @@ int kvm_vgic_create(struct kvm *kvm, u32 type)
 
 
 	mutex_lock(&kvm->lock);
 	mutex_lock(&kvm->lock);
 
 
-	if (kvm->arch.vgic.vctrl_base) {
+	if (irqchip_in_kernel(kvm)) {
 		ret = -EEXIST;
 		ret = -EEXIST;
 		goto out;
 		goto out;
 	}
 	}