|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V2 3/8] xen/arm: Add funtions of mapping between vCPUID and vMPIDR
Hi Chen, Title: s/funtions/functions/ On 23/05/2015 14:52, Chen Baozi wrote: From: Chen Baozi <baozich@xxxxxxxxx> GICv3 restricts that the maximum number of CPUs in affinity 0 (one cluster) is 16. 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 vMPIDR. The functions you are adding don't deal with the vMPIDR but only a part of it used for the affinity. I would rename the title and modify this last sentence to reflect it. We may have ... You can use MPIDR_AFFINITY_LEVEL(0) + vcpuid |= ((vaff >> MPIDR_LEVEL_SHIFT(1)) & 0xff) << 4; Same here with 1. I would add a BUILD_BUG_ON(MAX_VIRT_CPUS < ((1 << 12))) in order to catch MAX_VIRT_CPUS increasing without changing the mapping between the VCPU ID and the affinity. + vaff = (vcpuid & 0x0f) << MPIDR_LEVEL_SHIFT(0); + vaff |= ((vcpuid >> 4) & 0xff) << MPIDR_LEVEL_SHIFT(1); s/0xff/MPIDR_LEVEL_MASK/ + + return vaff; +} + #endif /* __ASM_DOMAIN_H__ */ /* Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |