From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH V2 1/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64 Date: Sat, 23 May 2015 15:46:32 +0100 Message-ID: <556092C8.8090209@citrix.com> References: <1432389153-28207-1-git-send-email-cbz@baozis.org> <1432389153-28207-2-git-send-email-cbz@baozis.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YwCMO-0003bD-Ss for xen-devel@lists.xenproject.org; Sat, 23 May 2015 16:33:16 +0000 In-Reply-To: <1432389153-28207-2-git-send-email-cbz@baozis.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Chen Baozi , xen-devel@lists.xenproject.org Cc: Julien Grall , Chen Baozi , Ian Campbell List-Id: xen-devel@lists.xenproject.org Hi Chen, On 23/05/2015 14:52, Chen Baozi wrote: > From: Chen Baozi > > GIC-500 supports up to 128 cores in a single SoC. Increase MAX_VIRT_CPUS > to 128 on arm64. This series have to be bisectable. Although, this patch will break compilation on ARM64 because you increased MAX_VIRT_CPUS without the re-distributor region (done in the next patch). Furthermore, GICv2 is only supporting 8 CPUs. We don't have to allow a guest with more than 8 vCPUs when the GICv2 is in use. Lastly, given that the support of 128 vCPUs will only worked when the last patch of this series is applied, I would move this patch at the end. > Signed-off-by: Chen Baozi > --- > xen/arch/arm/vgic-v3.c | 2 +- > xen/include/asm-arm/config.h | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c > index 45d54a2..40e1892 100644 > --- a/xen/arch/arm/vgic-v3.c > +++ b/xen/arch/arm/vgic-v3.c > @@ -906,7 +906,7 @@ static int vgic_v3_distr_mmio_write(struct vcpu *v, mmio_info_t *info) > rank = vgic_rank_offset(v, 64, gicd_reg - GICD_IROUTER, > DABT_DOUBLE_WORD); > if ( rank == NULL ) goto write_ignore; > - BUG_ON(v->domain->max_vcpus > 8); > + BUG_ON(v->domain->max_vcpus > MAX_VIRT_CPUS); This check is pointless. max_vcpus will always be inferior or equal to MAX_VIRT_CPUS. > new_irouter = *r; > vgic_lock_rank(v, rank, flags); > > diff --git a/xen/include/asm-arm/config.h b/xen/include/asm-arm/config.h > index 3b23e05..817c216 100644 > --- a/xen/include/asm-arm/config.h > +++ b/xen/include/asm-arm/config.h > @@ -47,7 +47,11 @@ > #define NR_CPUS 128 > #endif > > +#ifdef CONFIG_ARM_64 > +#define MAX_VIRT_CPUS 128 > +#else > #define MAX_VIRT_CPUS 8 > +#endif > > #define asmlinkage /* Nothing needed */ > > Regards, -- Julien Grall