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: Mon, 25 May 2015 11:46:16 +0200 Message-ID: <5562EF68.80007@citrix.com> References: <1432389153-28207-1-git-send-email-cbz@baozis.org> <1432389153-28207-2-git-send-email-cbz@baozis.org> <556092C8.8090209@citrix.com> <20150525010116.GB27980@cbz-thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Ywoxi-0001xo-Jr for xen-devel@lists.xenproject.org; Mon, 25 May 2015 09:46:22 +0000 In-Reply-To: <20150525010116.GB27980@cbz-thinkpad> 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 , Julien Grall Cc: xen-devel@lists.xenproject.org, Ian Campbell List-Id: xen-devel@lists.xenproject.org Hi Chen, On 25/05/2015 03:01, Chen Baozi wrote: > On Sat, May 23, 2015 at 03:46:32PM +0100, Julien Grall wrote: >> 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. > > What's your suggestion? I don't think we could know whether it is built for > a GICv2 or a GICv3 machine and define different values for corresponding > target. I'm not sure to understand your problem here. You know which vGIC version is emulated for a specific domain at domain creation time. The function domain_max_vcpus returns the maximum vCPUs for a give domain. You could create a new field in vgic_v2_ops to store the maximum number of vCPU handled. domain_max_vcpus would look like: return (min(d->arch->vgic.handler.max_vcpus, MAX_VIRT_CPUS)); Regards, -- -- Julien Grall