From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4591CC43381 for ; Wed, 27 Jan 2021 07:06:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0EA7520724 for ; Wed, 27 Jan 2021 07:06:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232852AbhA0HGL (ORCPT ); Wed, 27 Jan 2021 02:06:11 -0500 Received: from mga14.intel.com ([192.55.52.115]:20500 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S317827AbhA0Awz (ORCPT ); Tue, 26 Jan 2021 19:52:55 -0500 IronPort-SDR: SgMBw2oDT1ppSVfU+Bms1MeFzMIVebcJ2FFVst49iyYP+Aph3cb2SIF3NpZ1P/62iYQo8Lv9C7 aMF60rkVupaA== X-IronPort-AV: E=McAfee;i="6000,8403,9876"; a="179215356" X-IronPort-AV: E=Sophos;i="5.79,378,1602572400"; d="scan'208";a="179215356" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 16:52:14 -0800 IronPort-SDR: oklwDcgXGh7NO5d+3lKV16cp46aV47E3E8a87rwomkiMUofkH9qdA29Rqo5V84eCtQZCFLwOpu 69G8XFsS+h7Q== X-IronPort-AV: E=Sophos;i="5.79,378,1602572400"; d="scan'208";a="353629954" Received: from rsperry-desk.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.251.7.187]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2021 16:52:11 -0800 Date: Wed, 27 Jan 2021 13:52:09 +1300 From: Kai Huang To: Dave Hansen Cc: , , , , , , , , , , , Subject: Re: [RFC PATCH v3 05/27] x86/sgx: Add SGX_CHILD_PRESENT hardware error code Message-Id: <20210127135209.b7f35d507bbdf96af40646af@intel.com> In-Reply-To: <83fc6b6b-0ced-ca75-5c31-9c275778351f@intel.com> References: <5a7c7715147f089d97ae4c033b74b0eafb8f3f89.1611634586.git.kai.huang@intel.com> <3bdda0ea-3935-1a8a-8d11-b898371d6168@intel.com> <83fc6b6b-0ced-ca75-5c31-9c275778351f@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Tue, 26 Jan 2021 16:21:36 -0800 Dave Hansen wrote: > On 1/26/21 4:00 PM, Kai Huang wrote: > > On Tue, 2021-01-26 at 07:49 -0800, Dave Hansen wrote: > >> On 1/26/21 1:30 AM, Kai Huang wrote: > >>> From: Sean Christopherson > >>> > >>> SGX virtualization requires to allocate "raw" EPC and use it as "virtual > >>> EPC" for SGX guest. Unlike EPC used by SGX driver, virtual EPC doesn't > >>> track how EPC pages are used in VM, e.g. (de)construction of enclaves, > >>> so it cannot guarantee EREMOVE success, e.g. it doesn't have a priori > >>> knowledge of which pages are SECS with non-zero child counts. > >> > >> The grammar there is a bit questionable in spots. Here's a rewrite: > >> > >> SGX can accurately track how bare-metal enclave pages are used. This > >> enables SECS to be specifically targeted and EREMOVE'd only after all > >> child pages have been EREMOVE'd. This ensures that bare-metal SGX will > >> never encounter SGX_CHILD_PRESENT in normal operation. > > > > How about: > > > > "SGX driver can accurate track how enclave pages are used. This enables..." > > > > Since in another email, you mentioned that we should get rid of bare-metal driver, > > and Andy suggested we can just use SGX driver? > > > > Sure, but with correct grammar, please. > > "SGX driver can accurately track how enclave pages are used. This > enables..." > > Seriously, if you just paste the sentences into Word, it will highlight > this and tell you. Thanks. My fault.