xen/arm: Add functions of mapping between vCPUID and virtual affinity
authorChen Baozi <baozich@gmail.com>
Tue, 30 Jun 2015 08:00:16 +0000 (16:00 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 3 Jul 2015 10:11:26 +0000 (11:11 +0100)
commit53d60a7af68fa939bec8bb77c00589094cd4b440
treed912bfb345f50db6d705f501736c05a4bdbf34e3
parent4b83bdf05526622882aa86023166498509f27ee1
xen/arm: Add functions of mapping between vCPUID and virtual affinity

GICv3 restricts that the maximum number of CPUs in affinity 0 (one
cluster) is 16. (See the note of 'Bits[15:0]' in '5.7.29 ICC_SGI0R_EL1
ICC_SGI1R_EL1 and ICC_ASGI1R_EL1, GICv3 Architecture Specification')
That is to say the upper 4 bits of affinity 0 is unused. Current
implementation considers that AFF0 is equal to vCPUID, which makes all
vCPUs in one cluster, limiting its number to 16. If we would like to
support more than 16 number of vCPU in one guest, we need to make use
of AFF1. Considering the unused upper 4 bits, we need to create a pair
of functions mapping the vCPUID and virtual affinity.

Signed-off-by: Chen Baozi <baozich@gmail.com>
Reviewed-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/include/asm-arm/domain.h