diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2014-05-15 05:03:25 -0400 |
---|---|---|
committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-07-11 07:57:35 -0400 |
commit | f982cf4e9c37b19478c7bc6e0484a43a7e78cf57 (patch) | |
tree | acb2c678e9ef7f0301025b4c2b2296991a402dc3 /include | |
parent | 8f186d522c69bb18dd9b93a634da4953228c67d4 (diff) |
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 'include')
-rw-r--r-- | include/kvm/arm_vgic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index d8d52a9ca6a1..f6b9fec6fcac 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
@@ -117,6 +117,7 @@ struct vgic_params { | |||
117 | struct vgic_dist { | 117 | struct vgic_dist { |
118 | #ifdef CONFIG_KVM_ARM_VGIC | 118 | #ifdef CONFIG_KVM_ARM_VGIC |
119 | spinlock_t lock; | 119 | spinlock_t lock; |
120 | bool in_kernel; | ||
120 | bool ready; | 121 | bool ready; |
121 | 122 | ||
122 | /* Virtual control interface mapping */ | 123 | /* Virtual control interface mapping */ |
@@ -212,7 +213,7 @@ int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu); | |||
212 | bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, | 213 | bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run, |
213 | struct kvm_exit_mmio *mmio); | 214 | struct kvm_exit_mmio *mmio); |
214 | 215 | ||
215 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.vctrl_base)) | 216 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) |
216 | #define vgic_initialized(k) ((k)->arch.vgic.ready) | 217 | #define vgic_initialized(k) ((k)->arch.vgic.ready) |
217 | 218 | ||
218 | int vgic_v2_probe(struct device_node *vgic_node, | 219 | int vgic_v2_probe(struct device_node *vgic_node, |