From: Chen Baozi <cbz@baozis.org>
To: Julien Grall <julien.grall@citrix.com>
Cc: xen-devel@lists.xenproject.org, Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH V4 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity
Date: Sat, 30 May 2015 10:10:17 +0800 [thread overview]
Message-ID: <20150530021017.GC15126@cbz-thinkpad> (raw)
In-Reply-To: <55688A96.1050206@citrix.com>
On Fri, May 29, 2015 at 04:49:42PM +0100, Julien Grall wrote:
> Hi Chen,
>
> On 28/05/15 11:15, Chen Baozi wrote:
> > From: Chen Baozi <baozich@gmail.com>
> >
> > According to ARM CPUs bindings, the reg field should match the MPIDR's
> > affinity bits. We will use AFF0 and AFF1 when constructing the reg value
> > of the guest at the moment, for it is enough for the current max vcpu
> > number.
> >
> > Signed-off-by: Chen Baozi <baozich@gmail.com>
> > ---
> > xen/arch/arm/domain_build.c | 14 +++++++++++---
> > 1 file changed, 11 insertions(+), 3 deletions(-)
> >
> > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> > index a156de9..5591d82 100644
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -712,6 +712,7 @@ static int make_cpus_node(const struct domain *d, void *fdt,
> > char buf[15];
> > u32 clock_frequency;
> > bool_t clock_valid;
> > + uint32_t mpidr_aff;
> >
> > DPRINT("Create cpus node\n");
> >
> > @@ -761,9 +762,16 @@ static int make_cpus_node(const struct domain *d, void *fdt,
> >
> > for ( cpu = 0; cpu < d->max_vcpus; cpu++ )
> > {
> > - DPRINT("Create cpu@%u node\n", cpu);
> > + /*
> > + * According to ARM CPUs bindings, the reg field should match
> > + * the MPIDR's affinity bits. We will use AFF0 and AFF1 when
> > + * constructing the reg value of the guest at the moment, for it
> > + * is enough for the current max vcpu number.
> > + */
> > + mpidr_aff = vcpuid_to_vaffinity(cpu);
> > + DPRINT("Create cpu@%x node\n", mpidr_aff);
>
> I would print both the "logical CPUID" and the MPIDR. It will be easier
> for debugging.
Ok.
>
> >
> > - snprintf(buf, sizeof(buf), "cpu@%u", cpu);
> > + snprintf(buf, sizeof(buf), "cpu@%x", mpidr_aff);
>
> Changing cpu@ is not necessary.
See my previous comment about this.
Cheers,
Baozi.
next prev parent reply other threads:[~2015-05-30 2:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 10:15 [PATCH V4 0/8] Support more than 8 vcpus on arm64 with GICv3 Chen Baozi
2015-05-28 10:15 ` [PATCH V4 1/8] xen/arm: gic-v3: Increase the size of GICR in address space for guest Chen Baozi
2015-05-28 10:15 ` [PATCH V4 2/8] xen/arm: Add functions of mapping between vCPUID and virtual affinity Chen Baozi
2015-05-29 14:27 ` Julien Grall
2015-05-28 10:15 ` [PATCH V4 3/8] xen/arm: Use the new functions for vCPUID/vaffinity transformation Chen Baozi
2015-05-29 14:34 ` Julien Grall
2015-05-28 10:15 ` [PATCH V4 4/8] xen/arm: Use cpumask_t type for vcpu_mask in vgic_to_sgi Chen Baozi
2015-05-29 15:20 ` Julien Grall
2015-05-28 10:15 ` [PATCH V4 5/8] tools/libxl: Set 'reg' of cpu node equal to MPIDR affinity for domU Chen Baozi
2015-05-29 15:44 ` Julien Grall
2015-05-29 15:55 ` Ian Campbell
2015-05-29 16:08 ` Julien Grall
2015-05-30 2:08 ` Chen Baozi
2015-05-30 2:27 ` Chen Baozi
2015-05-28 10:15 ` [PATCH V4 6/8] xen/arm: Set 'reg' of cpu node for dom0 to match MPIDR's affinity Chen Baozi
2015-05-29 15:49 ` Julien Grall
2015-05-30 2:10 ` Chen Baozi [this message]
2015-05-28 10:15 ` [PATCH V4 7/8] xen/arm64: increase MAX_VIRT_CPUS to 128 on arm64 Chen Baozi
2015-05-29 15:51 ` Julien Grall
2015-05-29 16:20 ` Julien Grall
2015-05-29 16:41 ` Andrew Cooper
2015-05-29 16:45 ` Julien Grall
2015-05-29 16:49 ` Andrew Cooper
2015-05-28 10:15 ` [PATCH V4 8/8] xen/arm: make domain_max_vcpus return value according to vGIC version Chen Baozi
2015-05-28 10:17 ` Andrew Cooper
2015-05-29 16:18 ` 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=20150530021017.GC15126@cbz-thinkpad \
--to=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.