From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Chen Baozi <cbz@baozis.org>, xen-devel@lists.xenproject.org
Cc: Julien Grall <julien.grall@citrix.com>,
Chen Baozi <baozich@gmail.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH V3 8/8] xen/arm: make domain_max_vcpus be alias of max_vcpus in struct domain
Date: Thu, 28 May 2015 09:50:38 +0100 [thread overview]
Message-ID: <5566D6DE.1080106@citrix.com> (raw)
In-Reply-To: <1432799094-13602-9-git-send-email-cbz@baozis.org>
On 28/05/15 08:44, Chen Baozi wrote:
> From: Chen Baozi <baozich@gmail.com>
>
> Since the maximum vcpu information is already saved in the struct domain,
> there is no need for domain_max_vpus to return the fixed value.
>
> Signed-off-by: Chen Baozi <baozich@gmail.com>
> ---
> xen/include/asm-arm/domain.h | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h
> index 603a20b..b4e38a2 100644
> --- a/xen/include/asm-arm/domain.h
> +++ b/xen/include/asm-arm/domain.h
> @@ -261,10 +261,7 @@ struct arch_vcpu
> void vcpu_show_execution_state(struct vcpu *);
> void vcpu_show_registers(const struct vcpu *);
>
> -static inline unsigned int domain_max_vcpus(const struct domain *d)
> -{
> - return MAX_VIRT_CPUS;
> -}
> +#define domain_max_vcpus(d) (d->max_vcpus)
First of all, don't go altering a properly typed static inline like this
for a macro. The former is better in all regards, save the number of
lines it takes to express.
You appear to have missed the entire point of this function.
d->max_vcpus is uninitialised at this point (although it will always
have the value 0).
You have also missed the point of Juliens review, which is to say that
an ARM64 build of Xen running a GICv2 domain must not claim to support
128 cpus.
~Andrew
next prev parent reply other threads:[~2015-05-28 8:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 7:44 [PATCH V3 0/8] Support more than 8 vcpus on arm64 with GICv3 Chen Baozi
2015-05-28 7:44 ` [PATCH V3 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest Chen Baozi
2015-05-28 7:44 ` [PATCH V3 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity Chen Baozi
2015-05-28 7:44 ` [PATCH V3 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation Chen Baozi
2015-05-28 7:44 ` [PATCH V3 4/8] xen/arm: Use cpumask_t type for vcpu_mask in vgic_to_sgi Chen Baozi
2015-05-28 7:44 ` [PATCH V3 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU Chen Baozi
2015-05-28 7:44 ` [PATCH V3 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity Chen Baozi
2015-05-28 7:44 ` [PATCH V3 7/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64 Chen Baozi
2015-05-28 7:44 ` [PATCH V3 8/8] xen/arm: make domain_max_vcpus be alias of max_vcpus in struct domain Chen Baozi
2015-05-28 8:50 ` Andrew Cooper [this message]
2015-05-28 9:19 ` Chen Baozi
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=5566D6DE.1080106@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=baozich@gmail.com \
--cc=cbz@baozis.org \
--cc=ian.campbell@citrix.com \
--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.