public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Qiaowei Ren <qiaowei.ren@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	tboot-devel@lists.sourceforge.net,
	Xiaoyan Zhang <xiaoyan.zhang@intel.com>,
	Gang Wei <gang.wei@intel.com>
Subject: Re: [PATCH] x86: add a new SMP bring up way for tboot case
Date: Tue, 14 May 2013 08:27:56 -0700	[thread overview]
Message-ID: <519257FC.8070708@zytor.com> (raw)
In-Reply-To: <1368566485-14785-1-git-send-email-qiaowei.ren@intel.com>

On 05/14/2013 02:21 PM, Qiaowei Ren wrote:
> tboot provides a better AP wakeup mechanism based on cpu MWAIT
> feature for OS/VMM. With this mechanism, system will boot faster
> and will NOT require VT to be enabled. But it requires that
> OS/VMM must have support it, otherwise system can never boot up.
> 
> Once this mechanism is enabled, tboot will put APs waiting in
> MWAIT loops before launching kernel. kernel can check the new
> flag field in v6 tboot shared page for the hint. If the bit
> TB_FLAG_AP_WAKE_SUPPORT in flag field is set, kernel BSP has
> to write the monitored memory (tboot->ap_wake_trigger) to bring
> APs out of MWAIT loops. The sipi vector should be written in
> tboot->ap_wake_addr before waking up APs.
> 

This really needs a *detailed* specification about the state the CPU is
parked in.  Most BIOSes do in fact park the CPUs in an mwait loop, but
we can't use it because the CPU state they are parked in is ill-defined.

This is a good idea, but please write (or point to) a spec about what
the parked CPU state looks like and how the OS gets control.  From the
*looks* of the code I assume it is entered in 16-bit real mode but then
it is important to know what parts of the register state are well-defined.

> +#define TB_FLAG_AP_WAKE_SUPPORT 0X00000001

Minor nit: please lower-case the hexadecimal x.

	-hpa


  parent reply	other threads:[~2013-05-14 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14 21:21 [PATCH] x86: add a new SMP bring up way for tboot case Qiaowei Ren
2013-05-14 13:38 ` Borislav Petkov
2013-05-14 14:56   ` Ren, Qiaowei
2013-05-14 15:27 ` H. Peter Anvin [this message]
2013-05-15 12:55   ` Ren, Qiaowei
2013-05-15 14:44     ` H. Peter Anvin
2013-05-15 16:10       ` Wei, Gang
2013-05-15 16:24         ` H. Peter Anvin

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=519257FC.8070708@zytor.com \
    --to=hpa@zytor.com \
    --cc=gang.wei@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=qiaowei.ren@intel.com \
    --cc=tboot-devel@lists.sourceforge.net \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xiaoyan.zhang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox