public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Yao, Jiewen" <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	 Oliver Steffen <osteffen@redhat.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	 Srikanth Aithal <sraithal@amd.com>
Subject: Re: [edk2-devel] [PATCH v4 1/1] OvmfPkg/VirtHstiDxe: do not load driver in confidential guests
Date: Wed, 24 Apr 2024 18:26:45 +0200	[thread overview]
Message-ID: <CAMj1kXG1wv7eiKSN0DxjeboBFYO6H2F0P0G5F6MffOBz3WCsZA@mail.gmail.com> (raw)
In-Reply-To: <MW4PR11MB58724B9407C72B823050988C8C102@MW4PR11MB5872.namprd11.prod.outlook.com>

On Wed, 24 Apr 2024 at 08:45, Yao, Jiewen <jiewen.yao@intel.com> wrote:
>
> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
>

Thanks, I've queued this up.


> > -----Original Message-----
> > From: Gerd Hoffmann <kraxel@redhat.com>
> > Sent: Wednesday, April 24, 2024 2:00 PM
> > To: devel@edk2.groups.io
> > Cc: Oliver Steffen <osteffen@redhat.com>; Gerd Hoffmann
> > <kraxel@redhat.com>; Ard Biesheuvel <ardb+tianocore@kernel.org>; Yao, Jiewen
> > <jiewen.yao@intel.com>; Srikanth Aithal <sraithal@amd.com>
> > Subject: [PATCH v4 1/1] OvmfPkg/VirtHstiDxe: do not load driver in confidential
> > guests
> >
> > The VirtHstiDxe does not work in confidential guests.  There also isn't
> > anything we can reasonably test, neither flash storage nor SMM mode will
> > be used in that case.  So just skip driver load when running in a
> > confidential guest.
> >
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Fixes: 506740982bba ("OvmfPkg/VirtHstiDxe: add code flash check")
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > Tested-by: Srikanth Aithal <sraithal@amd.com>
> > ---
> >  OvmfPkg/VirtHstiDxe/VirtHstiDxe.inf | 1 +
> >  OvmfPkg/VirtHstiDxe/VirtHstiDxe.c   | 6 ++++++
> >  2 files changed, 7 insertions(+)
> >
> > diff --git a/OvmfPkg/VirtHstiDxe/VirtHstiDxe.inf
> > b/OvmfPkg/VirtHstiDxe/VirtHstiDxe.inf
> > index 9514933011e8..b5c237288766 100644
> > --- a/OvmfPkg/VirtHstiDxe/VirtHstiDxe.inf
> > +++ b/OvmfPkg/VirtHstiDxe/VirtHstiDxe.inf
> > @@ -49,6 +49,7 @@ [FeaturePcd]
> >    gUefiOvmfPkgTokenSpaceGuid.PcdSmmSmramRequire
> >
> >  [Pcd]
> > +  gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
> >    gUefiOvmfPkgTokenSpaceGuid.PcdBfvBase
> >    gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageVariableBase
> >
> > diff --git a/OvmfPkg/VirtHstiDxe/VirtHstiDxe.c
> > b/OvmfPkg/VirtHstiDxe/VirtHstiDxe.c
> > index b6e53a1219d1..efaff0d1f3cb 100644
> > --- a/OvmfPkg/VirtHstiDxe/VirtHstiDxe.c
> > +++ b/OvmfPkg/VirtHstiDxe/VirtHstiDxe.c
> > @@ -17,6 +17,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> >  #include <Library/MemoryAllocationLib.h>
> >  #include <Library/UefiBootServicesTableLib.h>
> >  #include <Library/UefiLib.h>
> > +#include <Library/PcdLib.h>
> >  #include <Library/PlatformInitLib.h>
> >
> >  #include <IndustryStandard/Hsti.h>
> > @@ -140,6 +141,11 @@ VirtHstiDxeEntrypoint (
> >    EFI_STATUS                           Status;
> >    EFI_EVENT                            Event;
> >
> > +  if (PcdGet64 (PcdConfidentialComputingGuestAttr)) {
> > +    DEBUG ((DEBUG_INFO, "%a: confidential guest\n", __func__));
> > +    return EFI_UNSUPPORTED;
> > +  }
> > +
> >    DevId = VirtHstiGetHostBridgeDevId ();
> >    switch (DevId) {
> >      case INTEL_82441_DEVICE_ID:
> > --
> > 2.44.0
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118220): https://edk2.groups.io/g/devel/message/118220
Mute This Topic: https://groups.io/mt/105705705/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-04-24 16:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-24  6:00 [edk2-devel] [PATCH v4 1/1] OvmfPkg/VirtHstiDxe: do not load driver in confidential guests Gerd Hoffmann
2024-04-24  6:45 ` Yao, Jiewen
2024-04-24 16:26   ` Ard Biesheuvel [this message]
2024-04-24 16:36     ` Yao, Jiewen
2024-04-24 17:05       ` Ard Biesheuvel
2024-04-24 22:56         ` Yao, Jiewen
2024-04-24 23:01           ` Michael D Kinney
2024-04-24 23:08             ` Yao, Jiewen
2024-04-24 23:21               ` Michael Kubacki
2024-04-25  2:37                 ` Yao, Jiewen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMj1kXG1wv7eiKSN0DxjeboBFYO6H2F0P0G5F6MffOBz3WCsZA@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox