[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v8 7/8] xen/arm: make domain_max_vcpus return value from vgic_ops



On Fri, 2015-06-12 at 16:32 +0800, Chen Baozi wrote:
> From: Chen Baozi <baozich@xxxxxxxxx>
> 
> Each vGIC driver supports different maximum numbers of vCPU. For
> example, GICv2 is limited to 8 vCPUs, while GICv3 can support up
> to 4096 vCPUs if we use both AFF0 and AFF1. Thus, domain_max_vcpus
> should depend on not only MAX_VIRT_CPUS but also the version
> of vGIC that the guest uses.
> 
> Since evtchn_init would call domain_max_vcpus to allocate poll_mask
> when the vgic_ops haven't been initialised yet, we make it return
> MAX_VIRT_CPUS at that time. On ARM32, event channel doesn't need
> to allocate the poll_mask because MAX_VIRT_CPUS < BITS_PER_LONG,
> while allocating more memory (2 unsigned long rather than 1) only
> for poll_mask on arm64 with GICv2 looks not so expensive.
> 
> We didn't keep it as the old static inline form because it will break
> compilation when access the member of struct domain:
> 
> In file included from xen/include/xen/domain.h:6:0,
>                  from xen/include/xen/sched.h:10,
>                  from arm64/asm-offsets.c:10:
> xen/include/asm/domain.h: In function âdomain_max_vcpusâ:
> xen/include/asm/domain.h:266:10: error: dereferencing pointer to incomplete 
> type
>      if (d->arch.vgic.version == GIC_V2)
>           ^
> 
> Signed-off-by: Chen Baozi <baozich@xxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

[...]
> +     * We use both AFF1 and AFF0 in (v)MPIDR. Thus, the max number of CPU
> +     * that can be supported is up to 4096(256*16) in theory.

Please stick an " == " ......................^ here.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.