Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3825313pxt; Tue, 10 Aug 2021 12:10:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg9aJ3s1BdqtWnMCVT+5jAW30HWtDmHkCXQHSVK/QU5eXXoy651O+rKdYDl/lX0aJOTKmR X-Received: by 2002:a17:906:3716:: with SMTP id d22mr49192ejc.376.1628622659208; Tue, 10 Aug 2021 12:10:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628622659; cv=none; d=google.com; s=arc-20160816; b=whYposVyohNgJKPFrWzFJTaCvEtyq4o9pti3rCCwQdl3Q9zOjIF4MP8k/mD6CcxHDh ZALpO5nr7XSqtsafk1h4xe9m0KY4Sabk2jcqdwoWPrZxawj68Cw66VpUEVBxPegzfeyP wEFfwiCEVWx8qf7q2Ndj8PeizlqZpZBK0NpsLIoTKs7fX7ckrZlZ0T5EnVKuQcziYxtL u/uy7Z0AXYGrEfT/M7NHt5tLPaYtObgNhnvuKqicbSfULQHdJmE7ZUnmE0cWudUeBmpb qHZ1guyoOXc4RH94uGSCtAe9KMK1U4M2ObvkAA+97zHVi3ch5P3OeIYuCFqRWRJlewAw NFVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=RA4HPHm4GNNdMFx/BtFHCsxB7oHNebT//+CdSI+65/0=; b=Sw4XiTymObnw3bGSNGuoRrCvKStUn9UcKuTcy5fzseiNuqxufW3THU8gp8+rvwCEQ/ yR6ALMIiYXFio8xUm9QUrodpY/GVqPAiKsGWiQ5k4OtIWsbbaQlxT2Q5Zt/12GQZFwIi seDFO+fhXaw/RBTGxd+gJoY/0JMtZoRpjCqNiY90T7vwL5m5kGSGQgA04/RY4xtAaW8h wKjhHS0/xXUcUciwudJ4L4f7nK0gbIX92BMG2Q0ERY7cofiEQT9FzffOy13jSx5mLB8D QwFS2WGnJA8JmPdodf/+GMu79mG8Ee4vABH38YfTPilYL53ACdxPk6ABxNd2J40E8pXV VhKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id m17si21132882edr.269.2021.08.10.12.10.32; Tue, 10 Aug 2021 12:10:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231200AbhHJTJT (ORCPT + 99 others); Tue, 10 Aug 2021 15:09:19 -0400 Received: from mga12.intel.com ([192.55.52.136]:42937 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbhHJTJS (ORCPT ); Tue, 10 Aug 2021 15:09:18 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10072"; a="194562192" X-IronPort-AV: E=Sophos;i="5.84,310,1620716400"; d="scan'208";a="194562192" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07c2770e-1171-24ab-9403-91b306b5b1a4@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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