From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 1C4512118D950 for ; Wed, 7 Nov 2018 22:16:15 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Nov 2018 22:16:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,478,1534834800"; d="scan'208";a="102554292" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 07 Nov 2018 22:16:14 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 7 Nov 2018 22:16:14 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.84]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.161]) with mapi id 14.03.0415.000; Thu, 8 Nov 2018 14:16:12 +0800 From: "Yao, Jiewen" To: Laszlo Ersek CC: "Ni, Ruiyu" , "edk2-devel@lists.01.org" , "Dong, Eric" Thread-Topic: [PATCH] UefiCpuPkg/SmmCpu: Block SMM read-out only when static paging is used Thread-Index: AQHUdXySOJOERivmzkq+iKHhZS1tGqVCZhsAgADzf5SAAKHAsP//0WQAgAGZV0A= Date: Thu, 8 Nov 2018 06:16:11 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F3DADED@shsmsx102.ccr.corp.intel.com> References: <20181106025935.102620-1-ruiyu.ni@intel.com> <4F047944-D550-432F-9A60-451D9772FE43@intel.com> <74D8A39837DF1E4DA445A8C0B3885C503F3D8305@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzM4NDA1MDgtYTZiZS00YjlhLWE0NTYtODg3YjI1ZTJlYWU1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiKzB0ZjcwSkZCMTdralVvNEJmUEczd1kzeW5ieTU3MDFkXC9mMlJ3YUVFUHhyaTVPY2RkSjZEZWl3YW9vZFk5MkIifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] UefiCpuPkg/SmmCpu: Block SMM read-out only when static paging is used X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2018 06:16:15 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Yeah, there is some good resource on the web. ACPI spec defined APEI for error handling. https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf Below ppt introduced basic info on memory technology such as spare or mirro= r. ftp://ftp.hp.com/pub/c-products/servers/options/c00256943.pdf Below ppt introduced basic info on RAS/HotPlug in Linux. https://events.static.linuxfound.org/sites/events/files/lcjp13_chen.pdf https://events.static.linuxfound.org/sites/events/files/lcjp13_ishimatsu.pd= f Put all things together: when memory error happens, a platform may generate= SMI or SCI redirect to SMI. Then SMI code may choose to analyze, recovery, or backup DIMM for OS memory= . As such, RAS SMI handler may need access OS memory, and/or interactive wi= th OS handler via ASL code. Thank you Yao Jiewen > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Wednesday, November 7, 2018 9:37 PM > To: Yao, Jiewen > Cc: Ni, Ruiyu ; edk2-devel@lists.01.org; Dong, Eric > > Subject: Re: [PATCH] UefiCpuPkg/SmmCpu: Block SMM read-out only when > static paging is used >=20 > On 11/07/18 09:27, Yao, Jiewen wrote: > > If Static paging is not used, then the SMM uses dynamic paging. > > > > Here dynamic paging means the page fault request on-demand. > > > > 2 special examples here: > > 1) above 4G MMIO. By default, SMM only setup paging table for 4G > memory. If MMIO above 4G, then SMM need use #PF handler to grant MMIO > access. > > 2) server RAS. By default, SMM only setup paging table for SMM > communication buffer. For server RAS, memory hotplug may request direct > OS memory access. If so, we also rely on #PF handler to grant OS access. > > > > This patch fixed the second issue in the second case. >=20 > This is very interesting -- if you have a bit of time, can you please > describe in more detail what "For server RAS, memory hotplug may request > direct OS memory access" means? What agents take what steps? >=20 > (I don't mean to hold this patch -- I've given my A-b, so this is for my > own education only. Although, adding this very useful info to the commit > message, or at least to the associated BZ, would be extremely useful.) >=20 > Thanks! > Laszlo