ARM: vGICv3: clarify on GUEST_GICV3_RDIST_REGIONS symbol

Normally there is only one GICv3 redistributor region, and we use
that for DomU guests using a GICv3.
Explain the background in a comment and why we need to keep the number
of hardware regions for Dom0.

Signed-off-by: Andre Przywara <andre.przywara@linaro.org>
Acked-by: Julien Grall <julien.grall@arm.com>
This commit is contained in:
Andre Przywara authored and Julien Grall committed 2018-03-12 11:14:18 +00:00
1 parent 185413355f
commit 2bb950b8d9
1 file changed
+11 -1
+11 -1
View File
@@ -1632,6 +1632,16 @@ static int vgic_v3_vcpu_init(struct vcpu *v)
static inline unsigned int vgic_v3_rdist_count(struct domain *d)
{
/*
* Normally there is only one GICv3 redistributor region.
* The GICv3 DT binding provisions for multiple regions, since there are
* platforms out there which need those (multi-socket systems).
* For Dom0 we have to live with the MMIO layout the hardware provides,
* so we have to copy the multiple regions - as the first region may not
* provide enough space to hold all redistributors we need.
* However DomU get a constructed memory map, so we can go with
* the architected single redistributor region.
*/
return is_hardware_domain(d) ? vgic_v3_hw.nr_rdist_regions :
GUEST_GICV3_RDIST_REGIONS;
}
@@ -1692,7 +1702,7 @@ static int vgic_v3_domain_init(struct domain *d)
{
d->arch.vgic.dbase = GUEST_GICV3_GICD_BASE;
/* XXX: Only one Re-distributor region mapped for the guest */
/* A single Re-distributor region is mapped for the guest. */
BUILD_BUG_ON(GUEST_GICV3_RDIST_REGIONS != 1);
d->arch.vgic.rdist_stride = GUEST_GICV3_RDIST_STRIDE;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.