public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Aithal, Srikanth via groups.io" <srikanth.aithal=amd.com@groups.io>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io, Konstantin Kostiuk <kkostiuk@redhat.com>,
	Oliver Steffen <osteffen@redhat.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	"Lendacky, Thomas" <Thomas.Lendacky@amd.com>
Subject: Re: [edk2-devel] [PATCH v3 4/5] OvmfPkg/VirtHstiDxe: add code flash check
Date: Tue, 23 Apr 2024 20:36:55 +0530	[thread overview]
Message-ID: <0b121f31-aefa-4b42-b54c-65f3e110e727@amd.com> (raw)
In-Reply-To: <r3ivp262rkhgahmmbh7pphhpnqa5j4admgxuge66qx76kzj3kx@4rc4uamaxiud>

[-- Attachment #1: Type: text/plain, Size: 2971 bytes --]


On 4/23/2024 8:01 PM, Gerd Hoffmann wrote:
> On Tue, Apr 23, 2024 at 07:14:04PM +0530, Aithal, Srikanth wrote:
>> Correcting.
>>
>> On 4/23/2024 7:09 PM, Aithal, Srikanth wrote:
>>> Hello,
>>>
>>> Todays OVMF/edk2 master branch is breaking AMD SEV-ES guest boot with
>>> OvmfX64 package, where as sev-es guest boots fine with AmdSev package.
>>>
>>> Git bisect pointed to below commit as bad, going back to previous commit
>>> i.e ddc43e7a SEV-ES guest boots fine with OvmfX64 package:
>> Git bisect pointed to below commit as bad, going back to previous commit i.e
>> ddc43e7a SEV-ES guest boots fine. With OVMF/edk2 master branch SEV-ES guest
>> boots fine with *AmdSev *package:
> The tests don't make much sense in confidential guests (both sev and
> tdx).  Which why the driver is not included in the AmdSevPkg builds.
>
> Not activating the driver in confidential guests should fix that, test
> patch below.
>
> take care,
>    Gerd
>
> 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:

Thanks, tested this patch on top of current edk2 master. Issue is 
resolved, am able to boot sev-es guests.

Tested-by: Srikanth Aithal<sraithal@amd.com>


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



[-- Attachment #2: Type: text/html, Size: 4679 bytes --]

  reply	other threads:[~2024-04-23 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 10:47 [edk2-devel] [PATCH v3 0/5] OvmfPkg: Add VirtHstiDxe driver Gerd Hoffmann
2024-04-22 10:47 ` [edk2-devel] [PATCH v3 1/5] " Gerd Hoffmann
2024-04-22 10:47 ` [edk2-devel] [PATCH v3 2/5] OvmfPkg: Add VirtHstiDxe to OVMF firmware build Gerd Hoffmann
2024-04-22 10:47 ` [edk2-devel] [PATCH v3 3/5] OvmfPkg/VirtHstiDxe: add varstore flash check Gerd Hoffmann
2024-04-22 10:47 ` [edk2-devel] [PATCH v3 4/5] OvmfPkg/VirtHstiDxe: add code " Gerd Hoffmann
2024-04-23 13:39   ` Aithal, Srikanth via groups.io
2024-04-23 13:44     ` Aithal, Srikanth via groups.io
2024-04-23 14:31       ` Gerd Hoffmann
2024-04-23 15:06         ` Aithal, Srikanth via groups.io [this message]
2024-04-22 10:47 ` [edk2-devel] [PATCH v3 5/5] OvmfPkg/VirtHstiDxe: add README.md Gerd Hoffmann
2024-04-22 12:37 ` [edk2-devel] [PATCH v3 0/5] OvmfPkg: Add VirtHstiDxe driver Ard Biesheuvel

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=0b121f31-aefa-4b42-b54c-65f3e110e727@amd.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