linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, tglx@linutronix.de,
	hpa@linux.intel.com, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/bsp-hotplug] x86, apic: Disable BSP if boot cpu is AP
Date: Tue, 12 Nov 2013 07:35:52 -0800	[thread overview]
Message-ID: <52824AD8.8000607@zytor.com> (raw)
In-Reply-To: <528200DE.1090706@jp.fujitsu.com>

On 11/12/2013 02:20 AM, HATAYAMA Daisuke wrote:
> 
> Thanks for pointing out that. I think the first two issues has already been
> fixed in v3 version. I've just posted v5 version a little time ago.

OK, I see now.  It looks like it was radically changed, so the branch in
the -tip tree is completely stale.

> BTW,
> I changed the basic design at v4 where we specify the initial APIC ID of
> the
> processor we want to disable in the kdump 2nd kernel from the the 1st
> kernel
> through newly introduced disable_cpu_apicid kernel parameter; it might be
> similar to the idea you described in the patch description of tip tree.

> I don't know the third issue. Could you explain what kind of things can
> happen on clustered system? Only IA32_APIC_BASE MSR is no longer trusted? Or are
> there other things we can possibly no longer trust?

On a clustered system, the CPU APICIDs will duplicate, as only a
hardware-specific method can obtain the cluster-wide ID.  That is why we
have struct apic.get_apic_id().

IA32_APIC_BASE_MSR is another matter... it doesn't even exist on older
hardware.  It might be as simple as if IA32_APIC_BASE_MSR doesn't exist
we ignore this whole mechanism (this applies to P5 and earlier, but also
modern derivatives like Quark) but we can't blindly touch this register
as it might trap.  At the very least it needs to be rdmsr_safe().

> Also, could you explain what you suggest to deal with the issue in more
> detail?

I think the only thing we can do is to record in the first kernel on
which CPU we were booted on.  Then there is no need to look at the BSP
flag in APIC_BASE_MSR at all or anything similar.

	-hpa


  reply	other threads:[~2013-11-12 15:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  9:27 [PATCH 0/2] x86, apic: Disable BSP if boot cpu is AP HATAYAMA Daisuke
2013-08-29  9:27 ` [PATCH 1/2] x86, apic: Add boot_cpu_is_bsp() to check if boot cpu is BSP HATAYAMA Daisuke
2013-10-09 23:15   ` [tip:x86/bsp-hotplug] " tip-bot for HATAYAMA Daisuke
2013-08-29  9:28 ` [PATCH 2/2] x86, apic: Disable BSP if boot cpu is AP HATAYAMA Daisuke
2013-08-31  5:22   ` Borislav Petkov
2013-09-02  2:32     ` HATAYAMA Daisuke
2013-09-02  7:13       ` Borislav Petkov
2013-09-02  9:42         ` HATAYAMA Daisuke
2013-09-04  6:12           ` Borislav Petkov
2013-09-09  6:18             ` HATAYAMA Daisuke
2013-10-09 23:16   ` [tip:x86/bsp-hotplug] " tip-bot for HATAYAMA Daisuke
2013-10-12 17:31     ` H. Peter Anvin
2013-10-12 17:42       ` Ingo Molnar
2013-11-11 19:54         ` H. Peter Anvin
2013-11-12 10:20           ` HATAYAMA Daisuke
2013-11-12 15:35             ` H. Peter Anvin [this message]
2013-08-29 13:54 ` [PATCH 0/2] " H. Peter Anvin
2013-08-29 23:37   ` Eric W. Biederman
2013-08-30 12:48     ` Vivek Goyal
2013-08-29 23:51   ` HATAYAMA Daisuke
2013-08-30 15:43     ` H. Peter Anvin
2013-10-09 20:20       ` Vivek Goyal
2013-10-14  9:03         ` Petr Tesarik

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=52824AD8.8000607@zytor.com \
    --to=hpa@zytor.com \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).