Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1904983rwl; Fri, 24 Mar 2023 18:09:07 -0700 (PDT) X-Google-Smtp-Source: AKy350b2P4A/NLoU6foOqtByeAeT/mnL61P8DQbKOH9v2qGKkz6eJ5r2U2C95dgWiXFUQgl7oBcd X-Received: by 2002:aa7:9e92:0:b0:62a:443b:eb3 with SMTP id p18-20020aa79e92000000b0062a443b0eb3mr4209258pfq.27.1679706547525; Fri, 24 Mar 2023 18:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679706547; cv=none; d=google.com; s=arc-20160816; b=oV2UKIj7SjCYsxTrS3RNzqtLstETcUfIN9iNWGgcDvaFxdlhsvhqWSS5Aiyt7TaaAT 9Re7DB3sCpTDlWjjCORoW6LwItqyxfWn9PavcOHAVjRAdLie4n7wp5SoLYRqdxvoXqGN 8sGuB59uoaUbcZl3jP7GkY4zPx7rGrE4cTrO/tQKDSU3Jc8Y5NuUuySQjzGi4L/QFPbY CwZuIlrbS7Ou66YlXJI3XhtkBMjTpe2n5fUrzNryS6Q2pGmZiVfy5rLwO/L4KKs2c4d/ ZTVW2+C4dicbVfJvVGhNOnbl5KxcqdRAxIUMRm0gJgnU5cYh+SrBoh2uSsNxJ3n6odO4 1VSg== 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:feedback-id :dkim-signature:dkim-signature; bh=263d8X9NDnlXPj9Gft3I5NwFp7vjifRWFXPErnNXYcg=; b=aau4SPeJPH7aXou7ptHjtKq1STIMYZgzZouvynO7S5LiiUX1eXTaylpWgX4lCBbCT8 nVuqUrih7Tfyo8f2Fi67WqrJXspeke4yJ+PiCrSAGVGYq2Fd1r5YwpcDX71fc1E/c1x1 gXosY3H8a5wnGQmZ/duz5EfdD8PddMbz7ZQKGdoxM0P0CrS/VubYC3U1ETDYXhHPN/4W sZTKk7XkZt6uL/Y8nnuem0Qf7LKsRft9v66Z5/71i43itQ+aIptSdaLpXDz1Xefqgvi0 DM1FwKIhSiWDAuoaz7TI9+HyRdLtKSTYVQIM2irbvMLrdouZwakIUmCGz/1sF/Miwz68 uunw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm3 header.b=SVyu3+WT; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Kwa9zywo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a628306000000b00625559a78a2si21335337pfe.107.2023.03.24.18.08.50; Fri, 24 Mar 2023 18:09:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm3 header.b=SVyu3+WT; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Kwa9zywo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbjCYAwG (ORCPT + 99 others); Fri, 24 Mar 2023 20:52:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjCYAwF (ORCPT ); Fri, 24 Mar 2023 20:52:05 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B21B15C8C; Fri, 24 Mar 2023 17:52:04 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AA04D5C00AB; Fri, 24 Mar 2023 20:52:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 24 Mar 2023 20:52:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1679705521; x= 1679791921; bh=263d8X9NDnlXPj9Gft3I5NwFp7vjifRWFXPErnNXYcg=; b=S Vyu3+WT1SQ/rpL2qc2AVcRZtC1GHV0VANuJwsnb7O6eD3ujY53Zq2C3RNp2VhjD9 kSJ1EJ+Zw8yt4dt4g3tdsF1epmgk+Y6dQqQgcvUGi2Qm+ja16GcM4FbDwObo6gtI pi04vLMwFg2BUmjNBkoYk22EYsqJa2AQac4Lu5WU+AHgsM+9gV29MBa4Zfq11uKe Cy80Bewh3fXKQ8hOB5sa9akOYIKgrGYGEpYbUpQDYkJfyKigqbDZuGUUy4PRV3H7 g9yEbctH5adS87bZ9xOH2G4HXbXRGkaPvNmwBaRyqIDV/UFqqbPhQNcpOq9xBlCi foSWP7R2Wwlzk7OJDskSg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1679705521; x=1679791921; bh=263d8X9NDnlXP j9Gft3I5NwFp7vjifRWFXPErnNXYcg=; b=Kwa9zywoQPN5tt82AYZ+Wg9Z9klHk 7RvusbiekcY51nEhKGK2jcIRMl+Rozu+uM2p5mQEVNXqvrqtsb7ApH7sJyLF7233 ZwYOmAPZS0IKtWacHr4094ha8LJn4jQOAu5avofXNR9tl0ewf7J/aZzYgGIXaj1R 9UXuVNSMj3xQxAGEAj8lBhd5dYv4CDUFe8xJ+uYDYqZzGUYpnmDz1r5AV26g7BYF IkQozErZ0/l8GfKLgFN/xYXIXSFqiFQO2xAKLcu8EmUpuHK1ssxJ2jiIy2X+eQrR pV1qTU4O1HdJBgP7IwY/9mSxS/LZc8mhtVU/btMEdix83nf6OgAJFqmjw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegjedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdttddttddtvdenucfhrhhomhepfdfmihhr ihhllhcutedrucfuhhhuthgvmhhovhdfuceokhhirhhilhhlsehshhhuthgvmhhovhdrnh grmhgvqeenucggtffrrghtthgvrhhnpeelgffhfeetlefhveffleevfffgtefffeelfedu udfhjeduteeggfeiheefteehjeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepkhhirhhilhhl sehshhhuthgvmhhovhdrnhgrmhgv X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Mar 2023 20:52:00 -0400 (EDT) Received: by box.shutemov.name (Postfix, from userid 1000) id 0EE5310A607; Sat, 25 Mar 2023 03:51:57 +0300 (+03) Date: Sat, 25 Mar 2023 03:51:57 +0300 From: "Kirill A. Shutemov" To: Borislav Petkov Cc: "Kirill A. Shutemov" , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Dario Faggioli , Dave Hansen , Mike Rapoport , David Hildenbrand , Mel Gorman , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, aarcange@redhat.com, peterx@redhat.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv8 06/14] efi/x86: Implement support for unaccepted memory Message-ID: <20230325005157.37b4alnuf6p6mh66@box.shutemov.name> References: <20221207014933.8435-1-kirill.shutemov@linux.intel.com> <20221207014933.8435-7-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 03, 2023 at 03:20:55PM +0100, Borislav Petkov wrote: > > diff --git a/drivers/firmware/efi/Kconfig b/drivers/firmware/efi/Kconfig > > index 6787ed8dfacf..8aa8adf0bcb5 100644 > > --- a/drivers/firmware/efi/Kconfig > > +++ b/drivers/firmware/efi/Kconfig > > @@ -314,6 +314,20 @@ config EFI_COCO_SECRET > > virt/coco/efi_secret module to access the secrets, which in turn > > allows userspace programs to access the injected secrets. > > > > +config UNACCEPTED_MEMORY > > + bool > > + depends on EFI_STUB > > This still doesn't make a whole lotta sense. If I do "make menuconfig" I don't > see the help text because that bool doesn't have a string prompt. So who is that > help text for? It is a form of documentation for a developer. The same happens for other options. For instance, BOOT_VESA_SUPPORT or ARCH_HAS_CURRENT_STACK_POINTER. Yes, it is not visible user, but I still think it is helpful for a developer to understand what the option does. > Then, in the last patch you have > > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -888,6 +888,8 @@ config INTEL_TDX_GUEST > select ARCH_HAS_CC_PLATFORM > select X86_MEM_ENCRYPT > select X86_MCE > + select UNACCEPTED_MEMORY > + select EFI_STUB > > I guess you want to select UNACCEPTED_MEMORY only. I had to rework it as config INTEL_TDX_GUEST ... depends on EFI_STUB select UNACCEPTED_MEMORY Naked select UNACCEPTED_MEMORY doesn't work if EFI and EFI_STUB is disabled: WARNING: unmet direct dependencies detected for UNACCEPTED_MEMORY Depends on [n]: EFI [=n] && EFI_STUB [=n] Selected by [y]: - INTEL_TDX_GUEST [=y] && HYPERVISOR_GUEST [=y] && X86_64 [=y] && CPU_SUP_INTEL [=y] && X86_X2APIC [=y] IIUC, the alternative is to have selects all the way down the option tree. > > And I've already mentioned this whole mess: > > https://lore.kernel.org/r/Yt%2BnOeLMqRxjObbx@zn.tnic > > Please incorporate all review comments before sending a new version of > your patch. > > Ignoring review feedback is a very unfriendly thing to do: > > - if you agree with the feedback, you work it in in the next revision > > - if you don't agree, you *say* *why* you don't Sorry, it was not my intention. I misread your comment and focused on build issues around the option. -- Kiryl Shutsemau / Kirill A. Shutemov