From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web10.41182.1674637324283314107 for ; Wed, 25 Jan 2023 01:02:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TpoZw4ae; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 69AF5B81731 for ; Wed, 25 Jan 2023 09:02:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 204E1C4339C for ; Wed, 25 Jan 2023 09:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674637321; bh=Yzuf5ylUOt1oMqjrJdUAMACvLSTpFJ2H3YvRP5zWTyM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=TpoZw4aebeKf03l/ItG22cI5TYvrfk9W+xeZWE/thqEmkd5NmRROMkN+7xoxl+SVT VRvrrS5Yijf9b4bSMERQhLFd7HWLr54Ig4sxga6lSsU1eK4R84LyPeSWi8YG23Zad0 1Mukhhs5/KaANyFCdMGeQEST2nko6NnBppLd9AlPzHhc9WxNUOlYKWyk3/aSaI7Oyl 5SF/jzeSC5PHIYF6SiVISm55LFB5fbHwpB1rNiOMF6q28qpPnujrGrFzsIveDOYoRm H+08lmmgnxmE4BmP9UTGsY0oxQfijQfAO/KtaI7i0JPInTUaAdK01i7stIfDa44lix GA0pE5Musa11g== Received: by mail-lf1-f43.google.com with SMTP id j17so27860869lfr.3 for ; Wed, 25 Jan 2023 01:02:01 -0800 (PST) X-Gm-Message-State: AFqh2koeiNBJXf3aC6LOGoIr7/qdjiUVIdbSOF1X5Zz3G/cwlNmBRF4J knZBgPXQCZuYd9WXENSuoFPWeSnZftvFrEi/tYw= X-Google-Smtp-Source: AMrXdXvnXxEXeoul+boxIPMOv19QtefpAzCa+78zqboSb/qYATwd7zhDxrvIIt1pK2X/0ZaO0gNn+FOFtrE4PRgfntQ= X-Received: by 2002:ac2:5dd4:0:b0:4b5:964d:49a4 with SMTP id x20-20020ac25dd4000000b004b5964d49a4mr2683756lfq.637.1674637319082; Wed, 25 Jan 2023 01:01:59 -0800 (PST) MIME-Version: 1.0 References: <16581.1673625639418051810@groups.io> <0918b9db-c949-75ce-a24e-f12f03865938@intel.com> <20230116102801.y3l6xn3gdgregn4k@sirius.home.kraxel.org> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 25 Jan 2023 10:01:47 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v9 0/4] Add safe unaccepted memory behavior To: devel@edk2.groups.io, thomas.lendacky@amd.com Cc: kraxel@redhat.com, dave.hansen@intel.com, dionnaglaze@google.com, dave.hansen@linux.intel.com, Jiewen , "Shutemov, Kirill" Content-Type: text/plain; charset="UTF-8" On Tue, 24 Jan 2023 at 23:42, Lendacky, Thomas via groups.io wrote: > > On 1/16/23 04:28, Gerd Hoffmann via groups.io wrote: > > On Fri, Jan 13, 2023 at 10:34:15AM -0800, Dave Hansen wrote: > >> On 1/13/23 10:23, Dionna Glaze via groups.io wrote: > >>>> However, *NONE* of this points me in the direction of saying that we > >>>> should have an OS/firmware protocol to negotiate whether the firmware or > >>>> OS does page acceptance other than the existing UEFI memory map bit. > >>> We know of distributions that are going to release SEV-SNP support > >>> without unaccepted memory support, > >> > >> Well, I guess that's a bit of a different problem. > >> > >> I'd love to hear from the distros what they're planning on carrying > >> outside of mainline and what their plans are for the kernel side of this > >> series. > > > > Fedora has near zero additional patches, so it pretty much depends on > > how mainline merges stuff. If SEV-SNP or TDX or both will land in an > > upstream release before support for unaccepted memory lands too you'll > > Sorry, just saw this... > > SEV-SNP guest support has already landed upstream and is part of the 5.19 > kernel. So without this interface, anyone using a newer OVMF with a 5.19 > to whatever kernel just before unaccepted memory finally gets pulled into, > would have issues. > Exactly. And my Fedora kernel has those bits enabled by default. So I suppose the way forward here is to expose this protocol only on OVMF builds that target SEV-SNP, instead of introducing it as a generic CoCo feature. On the Linux side, we can make its boot time invocation dependent on CONFIG_AMD_MEM_ENCRYPT as well as CONFIG_UNACCEPTED_MEMORY.