From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [RFC 1/4] xen/arm64: Map the redistributor region by max_vcpus of domU danamically Date: Thu, 14 May 2015 18:51:59 +0100 Message-ID: <5554E0BF.50409@citrix.com> References: <1431612863-3762-1-git-send-email-cbz@baozis.org> <1431612863-3762-2-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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YsxJC-0007tq-Sk for xen-devel@lists.xenproject.org; Thu, 14 May 2015 17:52:34 +0000 In-Reply-To: <1431612863-3762-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@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: > diff --git a/xen/common/domctl.c b/xen/common/domctl.c > index e571e76..43b9f79 100644 > --- a/xen/common/domctl.c > +++ b/xen/common/domctl.c > @@ -33,6 +33,11 @@ > #include > #include > > +#ifdef CONFIG_ARM_64 > +#include > +#include > +#endif > + > static DEFINE_SPINLOCK(domctl_lock); > DEFINE_SPINLOCK(vcpu_alloc_lock); > > @@ -680,6 +685,11 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) > d->max_vcpus = max; > } > > +#ifdef CONFIG_ARM_64 > + if (!is_hardware_domain(d) && d->arch.vgic.version == GIC_V3) > + vgic_v3_rdist_map(d); > +#endif That is very hackish. It's common with other architecture and we are trying to be vgic agnostic in general. A vGIC callback would be more suitable. Although, as said on the cover letter. It's not necessary to allocate dynamically. We can expand the current region to support up to 16/128 vCPUs. Regards, -- Julien Grall