[edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-02 Thread Jiewen Yao
This series patch enables SMM page level protection. Features are: 1) PiSmmCore reports SMM PE image code/data information in EdkiiPiSmmMemoryAttributeTable, if the SMM image is page aligned. 2) PiSmmCpu consumes EdkiiPiSmmMemoryAttributeTable and set XD for data page and RO for code page. 3) PiSmm

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-02 Thread Yao, Jiewen
ao > Sent: Thursday, November 3, 2016 2:54 PM > To: edk2-devel@lists.01.org > Cc: Kinney, Michael D ; Tian, Feng > ; Laszlo Ersek ; Fan, Jeff > ; Zeng, Star > Subject: [edk2] [PATCH 0/6] Enable SMM page level protection. > > This series patch enables SMM page level protectio

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Laszlo Ersek
On 11/03/16 07:53, Jiewen Yao wrote: > This series patch enables SMM page level protection. > Features are: > 1) PiSmmCore reports SMM PE image code/data information > in EdkiiPiSmmMemoryAttributeTable, if the SMM image is page aligned. > 2) PiSmmCpu consumes EdkiiPiSmmMemoryAttributeTable > and se

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Yao, Jiewen
hat happened? Thank you Yao Jiewen From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo Ersek Sent: Friday, November 4, 2016 5:43 AM To: Yao, Jiewen Cc: Tian, Feng ; Radim Krčmář ; edk2-de...@ml01.01.org; Kinney, Michael D ; Paolo Bonzini ; Fan, Jeff ; Zeng, Star S

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Kinney, Michael D
...@redhat.com>>; edk2-de...@ml01.01.org<mailto:edk2-de...@ml01.01.org>; Kinney, Michael D mailto:michael.d.kin...@intel.com>>; Paolo Bonzini mailto:pbonz...@redhat.com>>; Fan, Jeff mailto:jeff....@intel.com>>; Zeng, Star mailto:star.z...@intel.com>> Subject

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Yao, Jiewen
Zeng, Star Subject: RE: [edk2] [PATCH 0/6] Enable SMM page level protection. Jiewen, Try setting -smp 8 for 8 CPUs. Mike From: Yao, Jiewen Sent: Thursday, November 3, 2016 4:52 PM To: Laszlo Ersek mailto:ler...@redhat.com>> Cc: Tian, Feng mailto:feng.t...@intel.com>>; Radim Kr?má? m

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Kinney, Michael D
server ^ -serial tcp:localhost:20716,server ^ -smp 8 ^ Best regards, Mike From: Yao, Jiewen Sent: Thursday, November 3, 2016 6:16 PM To: Kinney, Michael D ; Laszlo Ersek Cc: Tian, Feng ; Radim Kr?má? ; edk2-de...@ml01.01.org; Paolo Bonzini ; Fan, Jeff ; Zeng, Star Subject: RE: [edk2] [PATCH

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Yao, Jiewen
; edk2-de...@ml01.01.org; Paolo Bonzini ; Fan, Jeff ; Zeng, Star Subject: RE: [edk2] [PATCH 0/6] Enable SMM page level protection. Jiewen, This is how I launch Qemu on Windows for OvmfPkgIa32X64.dsc. The flags are not identical to yours. I have these additional flags: -cpu Nehalem -gl

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Kinney, Michael D
at.com>>; Fan, Jeff mailto:jeff@intel.com>>; Zeng, Star mailto:star.z...@intel.com>> Subject: RE: [edk2] [PATCH 0/6] Enable SMM page level protection. Jiewen, This is how I launch Qemu on Windows for OvmfPkgIa32X64.dsc. The flags are not identical to yours. I have these ad

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Kinney, Michael D
:05 PM To: Yao, Jiewen ; Laszlo Ersek ; Kinney, Michael D Cc: Tian, Feng ; Radim Kr?má? ; edk2-de...@ml01.01.org; Paolo Bonzini ; Fan, Jeff ; Zeng, Star Subject: RE: [edk2] [PATCH 0/6] Enable SMM page level protection. Jiewen, I remember now. Ovmf uses a different PCD setting for

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Yao, Jiewen
? ; edk2-de...@ml01.01.org; Paolo Bonzini ; Fan, Jeff ; Zeng, Star Subject: RE: [edk2] [PATCH 0/6] Enable SMM page level protection. Jiewen, I remember now. Ovmf uses a different PCD setting for PcdCpuSmmSyncMode. !if $(SMM_REQUIRE) == TRUE gUefiCpuPkgTokenSpaceGuid. PcdCpuSmmSyncMode |0x01

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-03 Thread Yao, Jiewen
.@redhat.com>>; edk2-de...@ml01.01.org<mailto:edk2-de...@ml01.01.org>; Paolo Bonzini mailto:pbonz...@redhat.com>>; Fan, Jeff mailto:jeff@intel.com>>; Zeng, Star mailto:star.z...@intel.com>> Subject: RE: [edk2] [PATCH 0/6] Enable SMM page level protection. Jiewen,

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Yao, Jiewen
: Tian, Feng ; Radim Krčmář ; edk2-de...@ml01.01.org; Kinney, Michael D ; Paolo Bonzini ; Fan, Jeff ; Zeng, Star Subject: Re: [edk2] [PATCH 0/6] Enable SMM page level protection. On 11/03/16 07:53, Jiewen Yao wrote: > This series patch enables SMM page level protection. > Features ar

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Paolo Bonzini
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 SmmWaitForApArr

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Yao, Jiewen
: Tian, Feng ; Radim Kr?má? ; edk2-de...@ml01.01.org; Fan, Jeff ; Zeng, Star 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.

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Paolo Bonzini
On 04/11/2016 14:28, Yao, Jiewen wrote: > 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 == N

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Laszlo Ersek
hank you > Yao Jiewen > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo > Ersek > Sent: Friday, November 4, 2016 5:43 AM > To: Yao, Jiewen > Cc: Tian, Feng ; Radim Krčmář ; > edk2-de...@ml01.01.org; Kinney, Michael D ; Paolo > Bonzini ; F

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Laszlo Ersek
dk2-de...@ml01.01.org; Kinney, Michael D ; Paolo > Bonzini ; Fan, Jeff ; Zeng, Star > > Subject: Re: [edk2] [PATCH 0/6] Enable SMM page level protection. > > On 11/03/16 07:53, Jiewen Yao wrote: >> This series patch enables SMM page level protect

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Paolo Bonzini
On 04/11/2016 16:22, Laszlo Ersek wrote: >> > What does this *KVM internal error. Suberror: 1* mean? > The key message is "emulation failure" -- it means that the processor > exits to the hypervisor (KVM) because it finds some code that it cannot > execute in guest mode natively, so the hyperviso

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Laszlo Ersek
On 11/04/16 02:15, Yao, Jiewen wrote: > Thank you, Mike. > Yes, I reproduced the issue and found out what is wrong. Here is detail: > > It seems OVMF never puts AP in SMM mode, even *before my patch series*. > I rollback all my update and use e9d093. > > I add some debug message in PerformRemaini

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Laszlo Ersek
On 11/04/16 04:14, Yao, Jiewen wrote: > Mike > > You are right. > > After I turn on this, I saw all APs. > > > > However, the system becomes extremely slow. Intolerable. > > > > I suggest to add more description around below on why it is set to 0x01 > by default, and what is the impact if

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Laszlo Ersek
On 11/04/16 14:50, Paolo Bonzini wrote: > > > On 04/11/2016 14:28, Yao, Jiewen wrote: >> 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 : *DataP

Re: [edk2] [PATCH 0/6] Enable SMM page level protection.

2016-11-04 Thread Laszlo Ersek
On 11/04/16 16:29, Paolo Bonzini wrote: > > > On 04/11/2016 16:22, Laszlo Ersek wrote: What does this *KVM internal error. Suberror: 1* mean? >> The key message is "emulation failure" -- it means that the processor >> exits to the hypervisor (KVM) because it finds some code that it cannot >>