Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3787765imm; Mon, 18 Jun 2018 04:11:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKbx1nkaRxrVHMP1N1EL/wL7wb9s0YQCuW5THIMa6kdXX2z6+kXXFH3JsBwsxDTzEQYUMdz X-Received: by 2002:a63:9c02:: with SMTP id f2-v6mr10580220pge.16.1529320269460; Mon, 18 Jun 2018 04:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529320269; cv=none; d=google.com; s=arc-20160816; b=i39BwgCehqDEzik++qE/DDLomDw8O8rRHEJV1aai5sLao6ToH4Abkzwv5Ms0c6RM/j RFD8Oa7X5M+UnBUdYwc2h0De4fLLG88WBBJdHdLF1Ayp2mz/9kas5bXtD09CIjhWcdyO 9oIVkAkTabewIG6Kv6yilMKKXhMzVa+Ofv7rdVjZBw4CVY5/inppgrmiVSZKzvDebK4f oKWUNu3lXTY3CThRm+u34D990fQVLwbq+JgPof6H/Aqde/5Derbgdv7EkZLMsH5/HF9d EgZ/OzzHdH/WTh0fgBS6e8gh8yjBoA4/dTZ0zQSviKIGDAPHo7AgQJGx6fDiamc+Wl8m ZW1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=414H8QuENF1dgcoxSEriNSW1l0vhmG8lFJ0yyGvnhlU=; b=sPVup46UjgWnRSkyoTT9RwPVFU5ppRfSvItIGlLK11U40bYQMYqqzaxawT9RpvMoBg D7ItRdL/CvRyv7ZYEupjwpXU9KGAMrkybF5kE+CirIKCVcK7QQsAJWXj7IekHIUQwgu+ /GjB3UfiqjR6hBNG5E3v+tQqxsvRyDxwyY4cCzmN3F1k+UFlDGXikOW852JRFUiY5AiL BAuatISZSHcZa2FMVa357YQJn2aIZ9As4T16U8ryApi98s/y3gdCPo12UOG1+RfYPgmX pwoTWp0jjgarWWXIg6ha6w+ra5Tb7x0OmHB4YllwKWyXXWqnJAp3zkAx6+79NsnBnrAx ouFw== 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 90-v6si15153541pla.38.2018.06.18.04.10.56; Mon, 18 Jun 2018 04:11:09 -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 S935751AbeFRK7d (ORCPT + 99 others); Mon, 18 Jun 2018 06:59:33 -0400 Received: from mga17.intel.com ([192.55.52.151]:15938 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933605AbeFRK7c (ORCPT ); Mon, 18 Jun 2018 06:59:32 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 03:59:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,238,1526367600"; d="scan'208";a="60094810" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 18 Jun 2018 03:59:28 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 604ED124; Mon, 18 Jun 2018 13:59:29 +0300 (EEST) Date: Mon, 18 Jun 2018 13:59:29 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky , Kai Huang , Jacob Pan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv3 12/17] x86/mm: Allow to disable MKTME after enumeration Message-ID: <20180618105928.oblisvtr2cpitilj@black.fi.intel.com> References: <20180612143915.68065-1-kirill.shutemov@linux.intel.com> <20180612143915.68065-13-kirill.shutemov@linux.intel.com> <13ba89bb-9df3-6272-96ea-005200c3198f@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13ba89bb-9df3-6272-96ea-005200c3198f@intel.com> User-Agent: NeoMutt/20170714-126-deb55f (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 13, 2018 at 06:30:02PM +0000, Dave Hansen wrote: > On 06/12/2018 07:39 AM, Kirill A. Shutemov wrote: > > Separate MKTME enumaration from enabling. We need to postpone enabling > > until initialization is complete. > > ^ enumeration Nope. I want to differentiate enumeration in detect_tme() and the point where MKTME is usable: after mktme_init(). > > The new helper mktme_disable() allows to disable MKTME even if it's > > s/to disable/disabling/ > > enumerated successfully. MKTME initialization may fail and this > > functionallity allows system to boot regardless of the failure. > > What can make it fail? I'll add this to commit message: MKTME needs per-KeyID direct mapping. It requires a lot more virtual address space which may be a problem in 4-level paging mode. If the system has more physical memory than we can handle with MKTME. The feature allows to fail MKTME, but boot the system successfully. -- Kirill A. Shutemov