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.web11.43374.1674647070899664590 for ; Wed, 25 Jan 2023 03:44:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mebKPoaN; 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 39847B8199F for ; Wed, 25 Jan 2023 11:44:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2A43C433D2 for ; Wed, 25 Jan 2023 11:44:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674647066; bh=avPRBKEpcogRCsuGfNeUT8LrJhuZAzgbx1gb5ZMWEEM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mebKPoaNIRTUwnTfeFfA64IAFpgnvoXZ9N9wQ99B12e6fV2mdiD+qkXnQ8Kg1gzLd h8RvvhxPIFX6diO23VS/n3B0tdSlXVVKoP9FuGjzq7h0dqddybIrSqtbRFs+n5cFwW kpU8wqvex2NFFmCxy8N55NHRcbfq001rdeG/14Y2pd4YaCbSabO1mWqeqdDCLS9qtF +hGqHdX6zE5vgWrLDm/LhFYJMiBhgXFJ8JL6aT9UUtF/WtFRb3Z+8afKTH7CyuMaWQ PlRSci5g29bgCO92I11YwqUIBVGzMdmQVixXr7GIGBUJ0271N6GzaQ+zZRqJCeoC2T RlCH1pOL3bDsQ== Received: by mail-lf1-f41.google.com with SMTP id f34so28475122lfv.10 for ; Wed, 25 Jan 2023 03:44:26 -0800 (PST) X-Gm-Message-State: AFqh2kr7WczlTHxqNeuo3/jZyjI9JT9j5ThIyTKXIJOFFoZtAr5MYJYS IMonzeTJ3qAy7m6ID8KZD3EKE9BfAjQWhJ3Un7o= X-Google-Smtp-Source: AMrXdXt+DOCOYfI9oDVOvHI1xgBXb21Un9FRfSB0qyjf8oOifM7k982GSmKdFeyo7NEyQ+Taz6B7R/jkvG8MlBzE+zw= X-Received: by 2002:ac2:4ade:0:b0:4d0:7b7:65dc with SMTP id m30-20020ac24ade000000b004d007b765dcmr1376701lfp.122.1674647064919; Wed, 25 Jan 2023 03:44:24 -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> In-Reply-To: <20230125091802.yya2a3cqlcmxzv2x@sirius.home.kraxel.org> From: "Ard Biesheuvel" Date: Wed, 25 Jan 2023 12:44:13 +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 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.