mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
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>
This commit is contained in:
committed by
Marc Zyngier
parent
40c4f8d272
commit
8f6cdc1c2e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user