aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2014-06-06 18:54:51 -0400
committerChristoffer Dall <christoffer.dall@linaro.org>2015-01-20 12:25:31 -0500
commita0675c25d6392c2197b796a60c4a2a0138c86355 (patch)
tree123679ec2053ab33bc40f9c67b9489c9508ca313 /include/kvm
parent9fedf146778e6d1c26319ebaf56131a4f3a6be03 (diff)
arm/arm64: KVM: add virtual GICv3 distributor emulation
With everything separated and prepared, we implement a model of a GICv3 distributor and redistributors by using the existing framework to provide handler functions for each register group. Currently we limit the emulation to a model enforcing a single security state, with SRE==1 (forcing system register access) and ARE==1 (allowing more than 8 VCPUs). We share some of the functions provided for GICv2 emulation, but take the different ways of addressing (v)CPUs into account. Save and restore is currently not implemented. Similar to the split-off of the GICv2 specific code, the new emulation code goes into a new file (vgic-v3-emul.c). Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_vgic.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index ff04afd0d901..98c30168bce4 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -162,7 +162,11 @@ struct vgic_dist {
162 162
163 /* Distributor and vcpu interface mapping in the guest */ 163 /* Distributor and vcpu interface mapping in the guest */
164 phys_addr_t vgic_dist_base; 164 phys_addr_t vgic_dist_base;
165 phys_addr_t vgic_cpu_base; 165 /* GICv2 and GICv3 use different mapped register blocks */
166 union {
167 phys_addr_t vgic_cpu_base;
168 phys_addr_t vgic_redist_base;
169 };
166 170
167 /* Distributor enabled */ 171 /* Distributor enabled */
168 u32 enabled; 172 u32 enabled;
@@ -224,6 +228,9 @@ struct vgic_dist {
224 */ 228 */
225 struct vgic_bitmap *irq_spi_target; 229 struct vgic_bitmap *irq_spi_target;
226 230
231 /* Target MPIDR for each IRQ (needed for GICv3 IROUTERn) only */
232 u32 *irq_spi_mpidr;
233
227 /* Bitmap indicating which CPU has something pending */ 234 /* Bitmap indicating which CPU has something pending */
228 unsigned long *irq_pending_on_cpu; 235 unsigned long *irq_pending_on_cpu;
229 236