Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5228380imm; Tue, 19 Jun 2018 07:10:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJsh2yz1w8OkWnaennstz78UBxh3r1sCEUkk0ns4DUS0LcSvxHluzsK5RlysPeMMRMYc3F8 X-Received: by 2002:a62:2044:: with SMTP id g65-v6mr18365579pfg.40.1529417414662; Tue, 19 Jun 2018 07:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529417414; cv=none; d=google.com; s=arc-20160816; b=yswblnOsiVLH2XK7OIuvzmqtPL/Hp5FdbHJdAlrhcWVahykiU3e83kSrGQJxakQypj UfXhWY+yT+vqmmvJUVO7fLTA1pABqrxto9+xReWupFCooH04bR13zpfy771buxwa/KCQ GreVrn1jGIFLIyWndjifLsMWlMNYELsW+tsA4RFs/Mizm+JtPnMx2bDVAOFntGvr8Dr4 su+5I7BdQAGTSWO+6f+qtNhvMVzjotqBCniTiKRvgfQDZ16rUxn30ONsbQIPZi3MM35r WgNAU0LNt4/IzJfyYyDlLjcAfsf4lemJlxGDWRQhcs1ebrvoSqK61Wemi57QYdTfhAjT ev4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Deyb2DiQTarQEPFrNVBH0s3qymLy3WK3/fLQtcM7mk8=; b=DzBpxP++dswnqiY+RbXWiWyyv1uYIOctezaqHdSgfU3lkFQk2ud+WAthbTFTs/zZh7 EqSCf5a8+5RnxtV/1BOYOoDaueElwd3j+dHsEEj4xYw1RMW0EOPibHdxXg4XyJsc4tVB ugXrnf5yRTuU1A9q8uYgPDTWp9JR0hsgeluu8Z5komFuR7GbiuwXdg93EvRGgKmeVGiX St3DgbxSLVmcDjHwvVevUAptuNIGUZwsXbxl10xAU3mDBJHH0hvOAZFGkk0HRbO9TqFY q1RCFVqPjjFAFrJdMKQ9c0zEK8e4vV2yy7m/fdCGR+br1JPXkXJkGyIJ4R0RCXJQCSR4 xqyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si20631671plj.146.2018.06.19.07.09.57; Tue, 19 Jun 2018 07:10:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757170AbeFSOIZ (ORCPT + 99 others); Tue, 19 Jun 2018 10:08:25 -0400 Received: from mga09.intel.com ([134.134.136.24]:27704 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757069AbeFSOIW (ORCPT ); Tue, 19 Jun 2018 10:08:22 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2018 07:08:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,243,1526367600"; d="scan'208";a="238441996" Received: from aluisell-mobl2.ger.corp.intel.com (HELO localhost) ([10.249.254.128]) by fmsmga005.fm.intel.com with ESMTP; 19 Jun 2018 07:08:17 -0700 Date: Tue, 19 Jun 2018 17:08:15 +0300 From: Jarkko Sakkinen To: Jethro Beekman Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:INTEL SGX" Subject: Re: [PATCH v11 09/13] x86, sgx: basic routines for enclave page cache Message-ID: <20180619140815.GA8034@linux.intel.com> References: <20180608171216.26521-1-jarkko.sakkinen@linux.intel.com> <20180608171216.26521-10-jarkko.sakkinen@linux.intel.com> <78982a32-c589-48e2-9a83-fd36903b5588@fortanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78982a32-c589-48e2-9a83-fd36903b5588@fortanix.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 08, 2018 at 11:21:48AM -0700, Jethro Beekman wrote: > On 2018-06-08 10:09, Jarkko Sakkinen wrote: > > +/* > > + * Writing the LE hash MSRs is extraordinarily expensive, e.g. > > + * 3-4x slower than normal MSRs, so we use a per-cpu cache to > > + * track the last known value of the MSRs to avoid unnecessarily > > + * writing the MSRs with the current value. Because most Linux > > + * kernels will use an LE that is signed with a non-Intel key, > > I don't think you can predict what most Linux kernels will be doing. I think > not initializing the cache to the CPU's initial value is fine, but this > particular argument shouldn't appear in the rationale. Are you just referring to the last sentence or the whole paragraph? /Jarkko