From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.46992.1674658377134672794 for ; Wed, 25 Jan 2023 06:52:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=adqr74jV; spf=pass (domain: kernel.org, ip: 139.178.84.217, 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 dfw.source.kernel.org (Postfix) with ESMTPS id 767E461507 for ; Wed, 25 Jan 2023 14:52:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5C2CC433A0 for ; Wed, 25 Jan 2023 14:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674658375; bh=tIMAIux9452VYSGXlHkNc8VXlwV/H/xFRlo1Q66Er4k=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=adqr74jVrt+1G7GIvzi76+1XA9N1olNO0v6ThR5Tlo8x2ksOf33M/nU45oYUV7RPT c3HjNxwI2zCMTpqbIj+PjSWXKzpdbztrw/U7/X3myxK+e+uYKsIEVkyoRyt9JyfeGJ KLyJnS/v+/RTZvzbzkSCd3TlJVRj+NWyV08MbmPHu4d0teQqhwEmSVDDMRrf5JJddv I7ylSOrdgYd0Im1c8ihBs3UApzkwfqJSTrDF8Gxz1bgb6sDKH/YF9NCHWYieq0Bbmp /C8OwmR0lPfdQ2YPMrDNWiYUTr+1krFbNTa3tkIwWSSoRTELOQX2p3OXG8p837ctcg 35S8Xmv75Q5NQ== Received: by mail-lf1-f42.google.com with SMTP id h24so25097109lfv.6 for ; Wed, 25 Jan 2023 06:52:55 -0800 (PST) X-Gm-Message-State: AFqh2krpFj28ryhW4JA/sfmuWkws/42LUWqaCAJpD8EDvXzk2+minpo1 B7bdzj0XELO5yYOcJSI3piPdr3vxcgp8gZhreX8= X-Google-Smtp-Source: AMrXdXuKu49z84zn74uoR6XbLNJb5RQdlWER/mVA0Wca/94RecFF91CbHhHQaQv5c1wgGBGPSaNvrbOIvmHPtL6eRNU= X-Received: by 2002:ac2:4ade:0:b0:4d0:7b7:65dc with SMTP id m30-20020ac24ade000000b004d007b765dcmr1408029lfp.122.1674658373808; Wed, 25 Jan 2023 06:52:53 -0800 (PST) MIME-Version: 1.0 References: <16581.1673625639418051810@groups.io> <0918b9db-c949-75ce-a24e-f12f03865938@intel.com> <20230116102801.y3l6xn3gdgregn4k@sirius.home.kraxel.org> <20230125091802.yya2a3cqlcmxzv2x@sirius.home.kraxel.org> <20230125121001.jnmlfkqheeqzygcw@sirius.home.kraxel.org> In-Reply-To: <20230125121001.jnmlfkqheeqzygcw@sirius.home.kraxel.org> From: "Ard Biesheuvel" Date: Wed, 25 Jan 2023 15:52:42 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v9 0/4] Add safe unaccepted memory behavior To: Gerd Hoffmann Cc: devel@edk2.groups.io, thomas.lendacky@amd.com, dave.hansen@intel.com, dionnaglaze@google.com, dave.hansen@linux.intel.com, Jiewen , "Shutemov, Kirill" Content-Type: text/plain; charset="UTF-8" On Wed, 25 Jan 2023 at 13:10, Gerd Hoffmann wrote: > > On Wed, Jan 25, 2023 at 12:44:13PM +0100, Ard Biesheuvel wrote: > > On Wed, 25 Jan 2023 at 10:18, Gerd Hoffmann wrote: > > > > > > On Wed, Jan 25, 2023 at 10:01:47AM +0100, Ard Biesheuvel wrote: > > > > > > > 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. > > > > > > OVMF builds already adapt at runtime, so this needs to be a runtime > > > check too. But IIRC the module already checks whenever SNP-SEV or TDX > > > is active before installing, so we only need to tweak that check to drop > > > the TDX check. > > > > > > > Sure. But Dionna's series introduces a new CocoDxe driver that is > > intended to carry shared logic, but we should probably add this stuff > > to AmdSevDxe instead. > > OvmfPkgX64.dsc can run in SEV/TDX modes too, so it is needed there as > well. We can probably leave it out from IntelTdx (assuming Intel's > upstream merge plans work out as expected and tdx-guest + unaccepted > memory actually land in the same kernel release). > OvmfPkgX64.dsc already incorporates AmdSevDxe, as do a few other platforms, so adding it there is still fine afaict.