]> xenbits.xensource.com Git - people/dwmw2/xen.git/commit
xen/arm: vgic-v3: Don't create empty re-distributor regions
authorJulien Grall <julien.grall@arm.com>
Mon, 1 Oct 2018 16:42:27 +0000 (17:42 +0100)
committerJulien Grall <julien.grall@arm.com>
Tue, 2 Oct 2018 17:06:06 +0000 (18:06 +0100)
commit54ec59f6b0b363c34cf1864d5214a05e35ea75ee
treeaedbce499b44af036b6229bf56ac1221ce34ff9d
parent703d9d5ec13a0f487e7415174ba54e0e3ca158db
xen/arm: vgic-v3: Don't create empty re-distributor regions

At the moment, Xen is assuming the hardware domain will have the same
number of re-distributor regions as the host. However, as the
number of CPUs or the stride (e.g on GICv4) may be different we end up
exposing regions which does not contain any re-distributors.

When booting, Linux will go through all the re-distributor region to
check whether a property (e.g vPLIs) is available accross all the
re-distributors. This will result to a data abort on empty regions
because there are no underlying re-distributor.

So we need to limit the number of regions exposed to the hardware
domain. The code reworked to only expose the minimun number of regions
required by the hardware domain. It is assumed the regions will be
populated starting from the first one.

Lastly, rename vgic_v3_rdist_count to reflect the value return by the
helper.

Reported-by: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Signed-off-by: Julien Grall <julien.grall@arm.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/gic-v3.c
xen/arch/arm/vgic-v3.c