public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Min Xu" <min.m.xu@intel.com>
To: Brijesh Singh <brijesh.singh@amd.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: James Bottomley <jejb@linux.ibm.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Erdem Aktas <erdemaktas@google.com>,
	"Michael Roth" <Michael.Roth@amd.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 1/2] Ovmfpkg: update Ia32 build to use new work area
Date: Mon, 18 Oct 2021 06:26:58 +0000	[thread overview]
Message-ID: <PH0PR11MB5064C416C0C3B2D45273374FC5BC9@PH0PR11MB5064.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20211014181711.784074-2-brijesh.singh@amd.com>

On October 15, 2021 2:17 AM, Brijesh Singh wrote:
> 
> The commit 80e67af9afca added support for the generic work area concept
> used mainly by the encrypted VMs. In the past, the work area was preliminary
> used by the SEV-ES VMs. The SEV-ES support is available for the X64 builds only.
> But now, that work area header contains fields that nonencrypted VMs and SEV
> VMs can use. They can be built for IA32. So, moving the work area defines
> outside of X64.
> 
> Fixes: 80e67af9afca ("OvmfPkg: introduce a common work area")
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Min Xu <min.m.xu@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
>  OvmfPkg/OvmfPkgIa32X64.fdf            | 3 +++
>  OvmfPkg/ResetVector/ResetVector.nasmb | 3 ++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
> index 245ca94044df..9d8695922f97 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.fdf
> +++ b/OvmfPkg/OvmfPkgIa32X64.fdf
> @@ -76,6 +76,9 @@ [FD.MEMFD]
>  0x007000|0x001000
> 
> gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmf
> PkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize
> 
> +0x008000|0x001000
> +gUefiOvmfPkgTokenSpaceGuid.PcdOvmfWorkAreaBase|gUefiOvmfPkgTokenS
> paceGu
> +id.PcdOvmfWorkAreaSize
> +
>  0x010000|0x010000
> 
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTo
> kenSpaceGuid.PcdOvmfSecPeiTempRamSize
> 
> diff --git a/OvmfPkg/ResetVector/ResetVector.nasmb
> b/OvmfPkg/ResetVector/ResetVector.nasmb
> index d1d800c56745..21b5fd82b830 100644
> --- a/OvmfPkg/ResetVector/ResetVector.nasmb
> +++ b/OvmfPkg/ResetVector/ResetVector.nasmb
> @@ -47,6 +47,8 @@
>  %include "Ia32/SearchForBfvBase.asm"
>  %include "Ia32/SearchForSecEntry.asm"
> 
> +%define WORK_AREA_GUEST_TYPE (FixedPcdGet32 (PcdOvmfWorkAreaBase))
> +
>  %ifdef ARCH_X64
>    #include <AutoGen.h>
> 
> @@ -72,7 +74,6 @@
>    %define GHCB_PT_ADDR (FixedPcdGet32 (PcdOvmfSecGhcbPageTableBase))
>    %define GHCB_BASE (FixedPcdGet32 (PcdOvmfSecGhcbBase))
>    %define GHCB_SIZE (FixedPcdGet32 (PcdOvmfSecGhcbSize))
> -  %define WORK_AREA_GUEST_TYPE (FixedPcdGet32 (PcdOvmfWorkAreaBase))
>    %define SEV_ES_WORK_AREA (FixedPcdGet32 (PcdSevEsWorkAreaBase))
>    %define SEV_ES_WORK_AREA_RDRAND (FixedPcdGet32
> (PcdSevEsWorkAreaBase) + 8)
>    %define SEV_ES_WORK_AREA_ENC_MASK (FixedPcdGet32
> (PcdSevEsWorkAreaBase) + 16)
> --
> 2.25.1

Reviewed-by: Min Xu <min.m.xu@intel.com>

Thanks.
Min

  parent reply	other threads:[~2021-10-18  6:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 18:17 [PATCH 0/2] work area fixes Brijesh Singh
2021-10-14 18:17 ` [PATCH 1/2] Ovmfpkg: update Ia32 build to use new work area Brijesh Singh
2021-10-15  5:00   ` Gerd Hoffmann
2021-10-18  6:26   ` Min Xu [this message]
2021-10-14 18:17 ` [PATCH 2/2] OvmfPkg/AmdSev: update the fdf to use new workarea PCD Brijesh Singh
2021-10-15  5:01   ` Gerd Hoffmann
2021-10-16 18:38   ` Dov Murik
2021-10-16 22:32     ` Brijesh Singh
2021-10-17 17:36       ` Dov Murik
2021-10-18  6:25   ` [edk2-devel] " Min Xu
2021-10-18  4:53 ` [edk2-devel] [PATCH 0/2] work area fixes Yao, Jiewen
2021-10-18 13:14   ` Yao, Jiewen
2021-10-18 14:45     ` Brijesh Singh
2021-10-18 14:48       ` Yao, Jiewen
2021-10-19  0:21         ` Min Xu
2021-10-19  2:31           ` 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=PH0PR11MB5064C416C0C3B2D45273374FC5BC9@PH0PR11MB5064.namprd11.prod.outlook.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