From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1C6F081D34 for ; Fri, 4 Nov 2016 04:34:18 -0700 (PDT) Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 744748F505; Fri, 4 Nov 2016 11:34:19 +0000 (UTC) Received: from [10.36.112.48] (ovpn-112-48.ams2.redhat.com [10.36.112.48]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uA4BYE0H017364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Nov 2016 07:34:16 -0400 To: "Yao, Jiewen" , "Kinney, Michael D" , Laszlo Ersek References: <74D8A39837DF1E4DA445A8C0B3885C50386BE1E9@shsmsx102.ccr.corp.intel.com> <74D8A39837DF1E4DA445A8C0B3885C50386BE2A5@shsmsx102.ccr.corp.intel.com> Cc: "Tian, Feng" , =?UTF-8?B?UmFkaW0gS3I/bcOhPw==?= , "edk2-devel@ml01.01.org" , "Fan, Jeff" , "Zeng, Star" From: Paolo Bonzini Message-ID: <188de6ef-f0cb-a330-bfdf-0fe4eec503ba@redhat.com> Date: Fri, 4 Nov 2016 12:34:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C50386BE2A5@shsmsx102.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 04 Nov 2016 11:34:19 +0000 (UTC) Subject: Re: [PATCH 0/6] Enable SMM page level protection. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2016 11:34:18 -0000 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit 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