KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions
authorEric Auger <eric.auger@redhat.com>
Tue, 22 May 2018 07:55:11 +0000 (09:55 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 25 May 2018 11:29:26 +0000 (12:29 +0100)
commit028bf278d31a0d04b096ebb5340949e9fc9e2010
treee166de0def07ddaf5fbb7fe8149e64ab8bb060ce
parentba7b3f1275fdd1a4059d25db0e248f05f72b9113
KVM: arm/arm64: Adapt vgic_v3_check_base to multiple rdist regions

vgic_v3_check_base() currently only handles the case of a unique
legacy redistributor region whose size is not explicitly set but
inferred, instead, from the number of online vcpus.

We adapt it to handle the case of multiple redistributor regions
with explicitly defined size. We rely on two new helpers:
- vgic_v3_rdist_overlap() is used to detect overlap with the dist
  region if defined
- vgic_v3_rd_region_size computes the size of the redist region,
  would it be a legacy unique region or a new explicitly sized
  region.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-v3.c
virt/kvm/arm/vgic/vgic.h