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:pbonz...@redhat.com] Sent: Friday, November 4, 2016 7:34 PM To: Yao, Jiewen <jiewen....@intel.com>; Kinney, Michael D <michael.d.kin...@intel.com>; Laszlo Ersek <ler...@redhat.com> Cc: Tian, Feng <feng.t...@intel.com>; Radim Kr?má? <rkrc...@redhat.com>; edk2-de...@ml01.01.org; Fan, Jeff <jeff....@intel.com>; Zeng, Star <star.z...@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 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel