From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8286372 for ; Tue, 10 Aug 2021 19:08:56 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10072"; a="276007609" X-IronPort-AV: E=Sophos;i="5.84,310,1620716400"; d="scan'208";a="276007609" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2021 12:08:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,310,1620716400"; d="scan'208";a="460504963" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 10 Aug 2021 12:08:49 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 3F085F9; Tue, 10 Aug 2021 22:08:36 +0300 (EEST) Date: Tue, 10 Aug 2021 22:08:36 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: "Kirill A. Shutemov" , Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] efi/x86: Implement support for unaccepted memory Message-ID: <20210810190836.cffj4fjqenuunwsd@black.fi.intel.com> References: <20210810062626.1012-1-kirill.shutemov@linux.intel.com> <20210810062626.1012-3-kirill.shutemov@linux.intel.com> <07c2770e-1171-24ab-9403-91b306b5b1a4@intel.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07c2770e-1171-24ab-9403-91b306b5b1a4@intel.com> On Tue, Aug 10, 2021 at 11:30:42AM -0700, Dave Hansen wrote: > On 8/9/21 11:26 PM, Kirill A. Shutemov wrote: > > +config UNACCEPTED_MEMORY > > + bool > > + depends on EFI_STUB > > + help > > + Some Virtual Machine platforms, such as Intel TDX, introduce > > + the concept of memory acceptance, requiring memory to be accepted > > + before it can be used by the guest. This protects against a class of > > + attacks by the virtual machine platform. > > + > > + This option adds support for unaccepted memory and makes such memory > > + usable by kernel. > > Do we really need a full-blown user-visible option here? If we, for > instance, just did: > > config UNACCEPTED_MEMORY > bool > depends on EFI_STUB > > it could be 'select'ed from the TDX Kconfig and no users would ever be > bothered with it. Would a user *ever* turn this on if they don't have > TDX (or equivalent)? But it's already not user selectable. Note that there's no prompt next to the "bool". The "help" section is just for documentation. I think it can be useful. -- Kirill A. Shutemov