public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	Laszlo Ersek <lersek@redhat.com>
Cc: "Tian, Feng" <feng.tian@intel.com>,
	"Radim Kr?má?" <rkrcmar@redhat.com>,
	"edk2-devel@ml01.01.org" <edk2-devel@ml01.01.org>,
	"Fan, Jeff" <jeff.fan@intel.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH 0/6] Enable SMM page level protection.
Date: Fri, 4 Nov 2016 13:28:43 +0000	[thread overview]
Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386BE6A3@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <188de6ef-f0cb-a330-bfdf-0fe4eec503ba@redhat.com>

Thank you Paolo.

I tried below way. But it does not help too much. It still takes more than 1 minutes to boot with SMP=8.
  SendSmiIpiAllExcludingSelf ();
  IoWrite8 (ICH9_APM_STS, DataPort    == NULL ? 0 : *DataPort);
  IoWrite8 (ICH9_APM_CNT, CommandPort == NULL ? 0 : *CommandPort);

I also tried to reduce the timeout PCD to:
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmApSyncTimeout|1000
However, I find CPU-2 is still missing.

Maybe it is caused by QEMU emulate AP in serial mode, not parallel mode.
I think it might be best choice to set PcdCpuSmmSyncMode|0x1
It also helps cover a very corner case in SMM. :)


At same time, would you mind help to take a look at the S3 unstable issue? If you have any clue, please let me know.


Thank you
Yao Jiewen

From: Paolo Bonzini [mailto:pbonzini@redhat.com]
Sent: Friday, November 4, 2016 7:34 PM
To: Yao, Jiewen <jiewen.yao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Laszlo Ersek <lersek@redhat.com>
Cc: Tian, Feng <feng.tian@intel.com>; Radim Kr?má? <rkrcmar@redhat.com>; edk2-devel@ml01.01.org; Fan, Jeff <jeff.fan@intel.com>; Zeng, Star <star.zeng@intel.com>
Subject: Re: [edk2] [PATCH 0/6] Enable SMM page level protection.



On 04/11/2016 04:20, Yao, Jiewen wrote:
> Good info. Thanks!
>
> I do not understand below word. I still see a **huge** performance gap.
>
> I am confused on how is it resolved in previous patch. Or do I need
> configure something for my QEMU?

The delay you're seeing comes from SmmWaitForApArrival.  See this
explanation:

----
Port 0xb2 on QEMU only sends an SMI to the currently executing
processor.  The SMI handler, however, and in particular
SmmWaitForApArrival, currently expects that SmmControl2DxeTrigger
triggers an SMI IPI on all processors rather than just the BSP.  Thus
all SMM invocations loop for a second (the default value of
PcdCpuSmmApSyncTimeout) before SmmWaitForApArrival sends another SMI IPI
to the APs.
----

Can you try calling SendSmiIpiAllExcludingSelf in SmmControl2DxeTrigger
(OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c) before the I/O port writes?

Thanks,

Paolo


  reply	other threads:[~2016-11-04 13:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04  2:49 [PATCH 0/6] Enable SMM page level protection Kinney, Michael D
2016-11-04  2:55 ` Yao, Jiewen
2016-11-04  3:05   ` Kinney, Michael D
2016-11-04  3:12     ` Kinney, Michael D
2016-11-04  3:20       ` Yao, Jiewen
2016-11-04 11:34         ` Paolo Bonzini
2016-11-04 13:28           ` Yao, Jiewen [this message]
2016-11-04 13:50             ` Paolo Bonzini
2016-11-04 16:34               ` Laszlo Ersek
2016-11-04  3:14     ` Yao, Jiewen
2016-11-04 16:28       ` Laszlo Ersek
  -- strict thread matches above, loose matches on Subject: below --
2016-11-03  6:53 Jiewen Yao
2016-11-03  6:55 ` Yao, Jiewen
2016-11-03 21:43 ` Laszlo Ersek
2016-11-03 23:51   ` Yao, Jiewen
2016-11-04  0:09     ` Kinney, Michael D
2016-11-04  1:15       ` Yao, Jiewen
2016-11-04 16:15         ` Laszlo Ersek
2016-11-04 15:22     ` Laszlo Ersek
2016-11-04 15:29       ` Paolo Bonzini
2016-11-04 17:36         ` Laszlo Ersek
2016-11-04  9:35   ` Yao, Jiewen
2016-11-04 15:23     ` Laszlo Ersek

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-list 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=74D8A39837DF1E4DA445A8C0B3885C50386BE6A3@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /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