Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6358932rwl; Tue, 4 Apr 2023 11:21:19 -0700 (PDT) X-Google-Smtp-Source: AKy350b9a3JDDzYHrhn8tuJaEKeGdLKE8rTpLMIGCdRSjBHYdaVH5uyAquUsQMpLr2YKikFWjFcM X-Received: by 2002:aa7:9f86:0:b0:626:1523:b10d with SMTP id z6-20020aa79f86000000b006261523b10dmr3125547pfr.4.1680632478698; Tue, 04 Apr 2023 11:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680632478; cv=none; d=google.com; s=arc-20160816; b=N+PVLDNir0zS07V31AGYfrvmcvzD7GbBN8zgj4exKFCwKHeSO0TmfGQ236fBxzjXnz isxum2D3uPCTcIlw6XrmqHbNrWKvBgXkBsgCkA8tVRTusdVZOMEDxWsA9Ssx/GvfcrkJ BGFy83n7c7EqX+SysqtAfiXRVXXbtaNzfTTC6n9ZnUSPH9vWXZzZgB/0Ks542rFI8fMT etU6wF56rDriKFqb35yX9rG7vog9I5eWhG/Suu07Hwx3CXitX1ZzUOggJ/kdXKAdNEer Pf174/1f/7DNOZAv4otqVtaWCbrluLnQXlKcsZ0KXI/swugZpuJePiZhao5JgbqTnxOO 7M5A== 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=DPiGXZr79qdt9px8j10lq9M2tfr42mD5cB8K58kjvgc=; b=xKO1KHmX/ktcdJfVQZqpymVJaEh0dKX+aMeAS007lQLUbby2pegv+EwJND5QPGjRE/ e7N8HQYCNa/dlfEuPMaIokYnEgg7rixN1IbH1kggR51ihsgNhwY83lYuS/vgg3WnQ6Go oggvgZmi/9bvLJ2OwmDNrrD8VsOT4t5Ac3h+VldKez1R+uaZgb7wp8jezOIBzbS9addQ eTkTuePylrymLgmoEpaV6p/LJdhE58PQShXollJAx3yzeZJmJZqFM6SwyYIe8pRD30np X1cbb+QUzs+FKtZ80UURZPUj6XpOoxhXv5C/ey7rlSLxp7EJt3W9haBPPLL8Q31tuJhl 6SyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm1 header.b="iu/eZA7J"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=GXRPYbkp; 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 v8-20020aa799c8000000b00625791bd85bsi10852463pfi.155.2023.04.04.11.21.06; Tue, 04 Apr 2023 11:21:18 -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=fm1 header.b="iu/eZA7J"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=GXRPYbkp; 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 S236202AbjDDSJ0 (ORCPT + 99 others); Tue, 4 Apr 2023 14:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235968AbjDDSJZ (ORCPT ); Tue, 4 Apr 2023 14:09:25 -0400 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C417FB for ; Tue, 4 Apr 2023 11:09:24 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id AC3073200A5A; Tue, 4 Apr 2023 14:09:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Tue, 04 Apr 2023 14:09:24 -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=fm1; t=1680631762; x= 1680718162; bh=DPiGXZr79qdt9px8j10lq9M2tfr42mD5cB8K58kjvgc=; b=i u/eZA7JQzjYq1JpF2tlwz8MvDXq+wUJSG5JjW8AwKWhIq7Ff8Qq/hfvzz3cDtlhL qPK1hO889McgRjYc3OQ56pNvAzNV1hmS3+h/53RU2MGs1Kwj3liEBYs5D0tjLA7f 1logVLlQHwHxm4kTBKIn6Y2vN7FDStvoBD9eLz5F+XswDnSAfP4deqbMhgybXc/T XuJVxdoyzIdRGepLUkSJNOAdxRZ+xW+h8AtT/k1r2RejViRJfmw/sUyRIaIxh119 jH1KEKX6OTDG90JUcCn6b16mMMt8MHmjUS6zLHAy1jeoYfLSQCZezpvPVTDxibll nf0ZP9fju3Sg5tzUumpGA== 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=1680631762; x=1680718162; bh=DPiGXZr79qdt9 px8j10lq9M2tfr42mD5cB8K58kjvgc=; b=GXRPYbkpZuwI6kzrJXsXMAwonBPZh P9McVMivfu49B+HOl5z1kJfqeLQ1MEHtikyArRllufRJ13M4K0zcaOc3g3lvsXuU OpsAew0PYOXtzFycn4x2fx+CFixfKiKEsjsH+Vs7wGeh9Mro6dsO4F4kG9BaHnC9 hPN1Lvjmg5QUxujchiV5itpf2e9FVyKT7aU9KWojBD85IyAuYRXLeN9BTjr6c2jn VIMyIZyU6p02cQPP5Vp/6Kth23xPY1yDgCCY4mF78eLfKar7TupQlLZl0uIO7nn0 0cmvqPQ/v1+t7mXbNIxRZdrx/Ny2AMveSbJvAsYu2+SHhc56q75FGXDSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeiledguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttddttddttddvnecuhfhrohhmpedfmfhi rhhilhhlucetrdcuufhhuhhtvghmohhvfdcuoehkihhrihhllhesshhhuhhtvghmohhvrd hnrghmvgeqnecuggftrfgrthhtvghrnhephfeigefhtdefhedtfedthefghedutddvueeh tedttdehjeeukeejgeeuiedvkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepkhhirhhilhhlsehshhhuthgvmhhovhdrnhgrmhgv X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 4 Apr 2023 14:09:20 -0400 (EDT) Received: by box.shutemov.name (Postfix, from userid 1000) id 4C2AE10C775; Tue, 4 Apr 2023 21:09:17 +0300 (+03) Date: Tue, 4 Apr 2023 21:09:17 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: Tom Lendacky , linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Michael Roth , Joerg Roedel , Dionna Glaze , Andy Lutomirski , Peter Zijlstra , Ard Biescheuvel , "Min M. Xu" , Gerd Hoffmann , James Bottomley , Jiewen Yao , Erdem Aktas , "Kirill A. Shutemov" Subject: Re: [PATCH v7 6/6] x86/efi: Safely enable unaccepted memory in UEFI Message-ID: <20230404180917.4fsgkzcdhqvph6io@box.shutemov.name> References: <20230330114956.20342-1-kirill.shutemov@linux.intel.com> <1d38d28c2731075d66ac65b56b813a138900f638.1680628986.git.thomas.lendacky@amd.com> <20230404174506.pjdikxvk2fsyy4au@box.shutemov.name> 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, Apr 04, 2023 at 10:57:52AM -0700, Dave Hansen wrote: > On 4/4/23 10:45, Kirill A. Shutemov wrote: > > I still think it is a bad idea. > > > > As I asked before, please include my > > > > Nacked-by: Kirill A. Shutemov > > > > into the patch. > > I was pretty opposed to this when I first saw it too. But, Tom and > company have worn down my opposition a bit. > > The fact is that we have upstream kernels out there with SEV-SNP support > that don't know anything about unaccepted memory. They're either > relegated to using the pre-accepted memory (4GB??) or _some_ entity > needs to accept the memory. That entity obviously can't be the kernel > unless we backport unaccepted memory support. > > This both lets the BIOS be the page-accepting entity _and_ allows the > entity to delegate that to the kernel when it needs to. > > As much as I want to nak this and pretend that that those existing > kernel's don't exist, my powers of self-delusion do have their limits. > > If our AMD friends don't do this, what is their alternative? The alternative is coordination on the host side: VMM can load a BIOS that pre-accepts all memory if the kernel is older. I know that it is not convenient for VMM, but it is technically possible. Introduce an ABI with an expiration date is much more ugly. And nobody will care about the expiration date, until you will try to remove it. -- Kiryl Shutsemau / Kirill A. Shutemov