All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: Mark Langsdorf <mark.langsdorf@amd.com>
Cc: xen-devel@lists.xensource.com, Chris Lalancette <clalance@redhat.com>
Subject: Re: [PATCH][retry 2][2/2] new platform hypervisor call to get APICIDs
Date: Tue, 04 Mar 2008 08:59:02 +0000	[thread overview]
Message-ID: <47CD1D66.76E4.0078.0@novell.com> (raw)
In-Reply-To: <200803031540.28151.mark.langsdorf@amd.com>

In addition to Keir's comment, this

>--- a/drivers/xen/core/smpboot.c	Mon Mar 03 13:36:57 2008 +0000
>+++ b/drivers/xen/core/smpboot.c	Mon Mar 03 14:40:26 2008 -0600
>@@ -254,21 +254,39 @@ static void __cpuinit cpu_initialize_con
> 	spin_unlock(&ctxt_lock);
> }
> 
>+int dom0_vcpus_pinned = 1;
> void __init smp_prepare_cpus(unsigned int max_cpus)
> {
> 	unsigned int cpu;
> 	struct task_struct *idle;
>+	int apicid;
>+	u8 pinned_apicids[NR_CPUS];

is introducing a latent bug. If you follow Keir's suggestion, it'll be gone.
If there's a reason to keep it obtaining all IDs at once, you'll need to
convert this to a static, __initdata array.

The other thing is that you absolutely shouldn't be limiting the APIC IDs
at the Xen interface to 8 bits. With the x2APIC, they'll not be bounded
to that smaller range anymore.

Finally, I'm worried about the way you handle dom0_vcpus_pinned:
By its name, I would assume that if I (later, for whatever reason) use
it elsewhere, I can be certain it means what it says. However, at
present, the hypercall succeeding does not imply that VCPUs are
indeed pinned. Further, under !is_initial_xen_domain() you shouldn't
set it, nor should you have a reason to even attempt the hypercall.

Jan

  parent reply	other threads:[~2008-03-04  8:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 21:40 [PATCH][retry 2][2/2] new platform hypervisor call to get APICIDs Mark Langsdorf
2008-03-03 22:40 ` Chris Lalancette
2008-03-04 17:57   ` Langsdorf, Mark
2008-03-04  8:59 ` Jan Beulich [this message]
2008-03-04  9:31   ` Keir Fraser
2008-03-04 11:43     ` Keir Fraser
2008-03-04 18:00       ` Langsdorf, Mark

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=47CD1D66.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=clalance@redhat.com \
    --cc=mark.langsdorf@amd.com \
    --cc=xen-devel@lists.xensource.com \
    /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.