All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] x86: always store APIC ID of CPU
Date: Thu, 26 Jun 2014 13:41:29 +0100	[thread overview]
Message-ID: <53AC14F9.2010106@citrix.com> (raw)
In-Reply-To: <53AC2079020000780001D9A7@mail.emea.novell.com>

On 26/06/14 12:30, Jan Beulich wrote:
>>>> On 26.06.14 at 13:02, <andrew.cooper3@citrix.com> wrote:
>> On 26/06/14 11:11, Jan Beulich wrote:
>>> +/*
>>> + * cpuid returns the value latched in the HW at reset, not the APIC ID
>>> + * register's value.  For any box whose BIOS changes APIC IDs, like
>>> + * clustered APIC systems, we must use hard_smp_processor_id.
>>> + *
>>> + * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID.
>>> + */
>>> +static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb)
>> What is the point of the cpuid_apic parameter?  It is unused.
>>
>> index_msb should probably be unsigned as it is used to shift with.
> For both of these - yes, I agree, but no, I don't want to change
> this here (I'm just moving the function up after all). The history of
> this is a bit difficult to interpret: Before in change in 2006 some
> variants of this function used both inputs, but some didn't. I
> suppose Keir didn't want to risk breaking clustered APIC systems,
> albeit as far as I looked only Summit systems were actually ignoring
> the passed in APIC ID, and we're not supporting these anymore.
>
> As to shift counts, I don't think it really matters whether they're
> signed or unsigned, as anything outside the range [0,bitwidth-1]
> produce undefined operations anyway.
>
> Jan
>

Fair enough.

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

      reply	other threads:[~2014-06-26 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 10:11 [PATCH] x86: always store APIC ID of CPU Jan Beulich
2014-06-26 11:02 ` Andrew Cooper
2014-06-26 11:30   ` Jan Beulich
2014-06-26 12:41     ` Andrew Cooper [this message]

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=53AC14F9.2010106@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --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.