diff options
author | Andre Przywara <andre.przywara@arm.com> | 2016-07-15 14:43:22 +0300 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2016-07-18 20:09:40 +0300 |
commit | 8f6cdc1c2eec20c3bbf3a83ad0e1db165f709917 (patch) | |
tree | fbc225d6e0db2124103c65bbe14834bfc6a0eda1 /include/kvm/arm_vgic.h | |
parent | 40c4f8d27296428c894551c9e30d8016a2551116 (diff) | |
download | linux-8f6cdc1c2eec20c3bbf3a83ad0e1db165f709917.tar.xz |
KVM: arm/arm64: vgic: Move redistributor kvm_io_devices
Logically a GICv3 redistributor is assigned to a (v)CPU, so we should
aim to keep redistributor related variables out of our struct vgic_dist.
Let's start by replacing the redistributor related kvm_io_device array
with two members in our existing struct vgic_cpu, which are naturally
per-VCPU and thus don't require any allocation / freeing.
So apart from the better fit with the redistributor design this saves
some code as well.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/kvm/arm_vgic.h')
-rw-r--r-- | include/kvm/arm_vgic.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index 12640378db98..5142e2ab9f5e 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h @@ -145,7 +145,6 @@ struct vgic_dist { struct vgic_irq *spis; struct vgic_io_device dist_iodev; - struct vgic_io_device *redist_iodevs; }; struct vgic_v2_cpu_if { @@ -193,6 +192,13 @@ struct vgic_cpu { struct list_head ap_list_head; u64 live_lrs; + + /* + * Members below are used with GICv3 emulation only and represent + * parts of the redistributor. + */ + struct vgic_io_device rd_iodev; + struct vgic_io_device sgi_iodev; }; int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write); |