From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 2/4] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64 Date: Thu, 14 May 2015 18:55:29 +0100 Message-ID: <5554E191.5030303@citrix.com> References: <1431612863-3762-1-git-send-email-cbz@baozis.org> <1431612863-3762-3-git-send-email-cbz@baozis.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 1YsxMb-0008Ua-FH for xen-devel@lists.xenproject.org; Thu, 14 May 2015 17:56:05 +0000 In-Reply-To: <1431612863-3762-3-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@citrix.com, Chen Baozi , ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Hi Chen, On 14/05/15 15:14, Chen Baozi wrote: > From: Chen Baozi > > GIC-500 supports up to 128 cores in a single SoC. Since the > redistributor register map is no longer set by fixed size, which limits > the number of vcpu, we increase MAX_VIRT_CPUS to 128 and remove the > corresponding restriction. > > Signed-off-by: Chen Baozi > --- > xen/arch/arm/vgic-v3.c | 3 --- > xen/include/asm-arm/config.h | 4 ++++ > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c > index a0c1de9..83e7344 100644 > --- a/xen/arch/arm/vgic-v3.c > +++ b/xen/arch/arm/vgic-v3.c > @@ -906,7 +906,6 @@ 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); This was here to catch bump of MAX_VIRT without adapting the vGIC code. The current vGICv3 is not supporting more than 16 vCPUs because it only cares about AFF0. > new_irouter = *r; > vgic_lock_rank(v, rank, flags); > > @@ -1203,8 +1202,6 @@ static int vgic_v3_domain_init(struct domain *d) > d->arch.vgic.nr_regions = GUEST_GICV3_RDIST_REGIONS; > d->arch.vgic.rdist_stride = GUEST_GICV3_RDIST_STRIDE; > > - /* The first redistributor should contain enough space for all CPUs */ > - BUILD_BUG_ON((GUEST_GICV3_GICR0_SIZE / GUEST_GICV3_RDIST_STRIDE) < MAX_VIRT_CPUS); I'd like to keep this BUILD_BUG_ON. It ensures that we reserved enough space in the guest layout for the redistributors. Regards, -- Julien Grall