summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic.c
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2014-05-15 10:03:25 +0100
committerChristoffer Dall <christoffer.dall@linaro.org>2014-07-11 04:57:35 -0700
commitf982cf4e9c37b19478c7bc6e0484a43a7e78cf57 (patch)
treeacb2c678e9ef7f0301025b4c2b2296991a402dc3 /virt/kvm/arm/vgic.c
parent8f186d522c69bb18dd9b93a634da4953228c67d4 (diff)
downloadop-kernel-dev-f982cf4e9c37b19478c7bc6e0484a43a7e78cf57.zip
op-kernel-dev-f982cf4e9c37b19478c7bc6e0484a43a7e78cf57.tar.gz
KVM: ARM: vgic: revisit implementation of irqchip_in_kernel
So far, irqchip_in_kernel() was implemented by testing the value of vctrl_base, which worked fine with GICv2. With GICv3, this field is useless, as we're using system registers instead of a emmory mapped interface. To solve this, add a boolean flag indicating if the we're using a vgic or not. Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'virt/kvm/arm/vgic.c')
-rw-r--r--virt/kvm/arm/vgic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index e4b9cbb..1348e74 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1650,6 +1650,7 @@ int kvm_vgic_create(struct kvm *kvm)
}
spin_lock_init(&kvm->arch.vgic.lock);
+ kvm->arch.vgic.in_kernel = true;
kvm->arch.vgic.vctrl_base = vgic->vctrl_base;
kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF;
kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF;
OpenPOWER on IntegriCloud