aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2016-09-12 10:49:24 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2016-09-22 07:22:21 -0400
commitacda5430bee4621f218391d0bcfbe4412adb3554 (patch)
treed279ce897d2666ca9481963dca9fc9aede6e85dd /include
parenta078bedf17c2e43819fea54bdfd5793845142e3a (diff)
ARM: KVM: Support vgic-v3
This patch allows to build and use vgic-v3 in 32-bit mode. Unfortunately, it can not be split in several steps without extra stubs to keep patches independent and bisectable. For instance, virt/kvm/arm/vgic/vgic-v3.c uses function from vgic-v3-sr.c, handling access to GICv3 cpu interface from the guest requires vgic_v3.vgic_sre to be already defined. It is how support has been done: * handle SGI requests from the guest * report configured SRE on access to GICv3 cpu interface from the guest * required vgic-v3 macros are provided via uapi.h * static keys are used to select GIC backend * to make vgic-v3 build KVM_ARM_VGIC_V3 guard is removed along with the static inlines Acked-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/kvm/arm_vgic.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index 8d22adcfe522..002f0922cd92 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -225,7 +225,6 @@ struct vgic_v2_cpu_if {
225}; 225};
226 226
227struct vgic_v3_cpu_if { 227struct vgic_v3_cpu_if {
228#ifdef CONFIG_KVM_ARM_VGIC_V3
229 u32 vgic_hcr; 228 u32 vgic_hcr;
230 u32 vgic_vmcr; 229 u32 vgic_vmcr;
231 u32 vgic_sre; /* Restored only, change ignored */ 230 u32 vgic_sre; /* Restored only, change ignored */
@@ -235,7 +234,6 @@ struct vgic_v3_cpu_if {
235 u32 vgic_ap0r[4]; 234 u32 vgic_ap0r[4];
236 u32 vgic_ap1r[4]; 235 u32 vgic_ap1r[4];
237 u64 vgic_lr[VGIC_V3_MAX_LRS]; 236 u64 vgic_lr[VGIC_V3_MAX_LRS];
238#endif
239}; 237};
240 238
241struct vgic_cpu { 239struct vgic_cpu {
@@ -304,13 +302,7 @@ bool kvm_vcpu_has_pending_irqs(struct kvm_vcpu *vcpu);
304void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu); 302void kvm_vgic_sync_hwstate(struct kvm_vcpu *vcpu);
305void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu); 303void kvm_vgic_flush_hwstate(struct kvm_vcpu *vcpu);
306 304
307#ifdef CONFIG_KVM_ARM_VGIC_V3
308void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg); 305void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg);
309#else
310static inline void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg)
311{
312}
313#endif
314 306
315/** 307/**
316 * kvm_vgic_get_max_vcpus - Get the maximum number of VCPUs allowed by HW 308 * kvm_vgic_get_max_vcpus - Get the maximum number of VCPUs allowed by HW