From: Ian Campbell <ian.campbell@citrix.com>
To: Chen Baozi <cbz@baozis.org>
Cc: Julien Grall <julien.grall@citrix.com>,
xen-devel@lists.xenproject.org, Chen Baozi <baozich@gmail.com>
Subject: Re: [PATCH v8 7/8] xen/arm: make domain_max_vcpus return value from vgic_ops
Date: Wed, 17 Jun 2015 14:02:19 +0100 [thread overview]
Message-ID: <1434546139.13744.370.camel@citrix.com> (raw)
In-Reply-To: <1434097969-16793-8-git-send-email-cbz@baozis.org>
On Fri, 2015-06-12 at 16:32 +0800, Chen Baozi wrote:
> From: Chen Baozi <baozich@gmail.com>
>
> 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@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[...]
> + * 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@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-06-17 13:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 8:32 [PATCH v8 0/8] Support more than 8 vcpus on arm64 with GICv3 Chen Baozi
2015-06-12 8:32 ` [PATCH v8 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest Chen Baozi
2015-06-12 8:32 ` [PATCH v8 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity Chen Baozi
2015-06-17 12:48 ` Ian Campbell
2015-06-12 8:32 ` [PATCH v8 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation Chen Baozi
2015-06-17 12:50 ` Ian Campbell
2015-06-12 8:32 ` [PATCH v8 4/8] xen/arm: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask Chen Baozi
2015-06-17 13:00 ` Ian Campbell
2015-06-17 13:13 ` Julien Grall
2015-06-17 13:19 ` Ian Campbell
2015-06-17 13:32 ` Julien Grall
2015-06-12 8:32 ` [PATCH v8 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU Chen Baozi
2015-06-12 8:32 ` [PATCH v8 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity Chen Baozi
2015-06-12 8:32 ` [PATCH v8 7/8] xen/arm: make domain_max_vcpus return value from vgic_ops Chen Baozi
2015-06-17 13:02 ` Ian Campbell [this message]
2015-06-12 8:32 ` [PATCH v8 8/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64 Chen Baozi
2015-06-17 13:03 ` Ian Campbell
2015-06-17 13:04 ` [PATCH v8 0/8] Support more than 8 vcpus on arm64 with GICv3 Ian Campbell
2015-06-17 13:45 ` Julien Grall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434546139.13744.370.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=baozich@gmail.com \
--cc=cbz@baozis.org \
--cc=julien.grall@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.