public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Lendacky, Thomas via groups.io" <thomas.lendacky=amd.com@groups.io>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io, Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Erdem Aktas <erdemaktas@google.com>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Min Xu <min.m.xu@intel.com>,
	Zhiguang Liu <zhiguang.liu@intel.com>,
	Rahul Kumar <rahul1.kumar@intel.com>, Ray Ni <ray.ni@intel.com>,
	Michael Roth <michael.roth@amd.com>
Subject: Re: [edk2-devel] [PATCH 03/16] MdePkg/BaseLib: Add a new VMGEXIT instruction invocation for SVSM
Date: Wed, 31 Jan 2024 12:30:35 -0600	[thread overview]
Message-ID: <2deccf7e-6ff9-4362-8bb8-5de2239cc653@amd.com> (raw)
In-Reply-To: <6rdteovxthwvxqvr2aey2yqci7zzkle3qty423jm7ysejxvapf@2dk3dp4ftsmn>

On 1/30/24 05:51, Gerd Hoffmann wrote:
> On Mon, Jan 29, 2024 at 09:51:47AM -0600, Tom Lendacky wrote:
>> On 1/29/24 07:22, Gerd Hoffmann wrote:
>>>> +global ASM_PFX(AsmVmgExitSvsm)
>>>> +ASM_PFX(AsmVmgExitSvsm):
>>>> +;
>>>> +; NASM doesn't support the vmmcall instruction in 32-bit mode and NASM versions
>>>> +; before 2.12 cannot translate the 64-bit "rep vmmcall" instruction into elf32
>>>> +; format. Given that VMGEXIT does not make sense on IA32, provide a stub
>>>> +; implementation that is identical to CpuBreakpoint(). In practice,
>>>> +; AsmVmgExitSvsm() should never be called on IA32.
>>>> +;
>>>> +    int  3
>>>> +    ret
>>>
>>> Why?  I assume because the calling convention is only defined for X64?
>>>
>>> Why do we need this in the first place if this is never called on IA32?
>>>
>>> Wouldn't it be better to have an ASSERT(FALSE) for IA32 in the code
>>> calling this?
>>
>> An ASSERT() only works for DEBUG code.
>>
>> I was following in the steps of AsmVmgExit, where we did this. I suppose we
>> could just not have it at all for IA32 and cause a build failure if someone
>> was to try and call this from 32-bit code. Thoughts?
> 
> See also patch #13 sub-thread.  Maybe just move the 32-bit build to the
> Null versions of the Libraries.
> 
> SEV-SNP + SVSM apparently is 64-bit only already (there is no 32-bit
> calling convention).
> 
> Over the last year Intel landed full 64-bit PEI support in edk2, which
> means the pure 64-bit build (OvmfPkgX64.dsc) has feature parity with
> the 32-bit PEI / 64-bit DXE build (OvmfPkgIa32X64.dsc).
> 
> So maybe we can simply leave 32-bit support behind and remove SEV
> support from OvmfPkgIa32X64.dsc and OvmfPkgIa32.dsc builds ...

That would break anyone that is currently using OvmfPkgIa32X64.dsc for 
base SEV (not ES or SNP), but I'm not sure if that is a real concern. For 
OvmfPkgIa32.dsc, no version of SEV will work, so that is doable.

Can we look at doing that cleanup after this series?

Thanks,
Tom

> 
> take care,
>    Gerd
> 


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



  reply	other threads:[~2024-01-31 18:30 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 22:12 [edk2-devel] [PATCH 00/16] Provide SEV-SNP support for running under an SVSM Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 01/16] OvmfPkg/BaseMemEncryptSevLib: Re-organize page state change support Lendacky, Thomas via groups.io
2024-01-29 12:59   ` Gerd Hoffmann
2024-01-29 15:39     ` Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 02/16] MdePkg/Register/Amd: Define the SVSM related information Lendacky, Thomas via groups.io
2024-01-29 13:12   ` Gerd Hoffmann
2024-01-26 22:13 ` [edk2-devel] [PATCH 03/16] MdePkg/BaseLib: Add a new VMGEXIT instruction invocation for SVSM Lendacky, Thomas via groups.io
2024-01-29 13:22   ` Gerd Hoffmann
2024-01-29 15:51     ` Lendacky, Thomas via groups.io
2024-01-30 11:51       ` Gerd Hoffmann
2024-01-31 18:30         ` Lendacky, Thomas via groups.io [this message]
2024-02-01  8:35           ` Gerd Hoffmann
2024-01-26 22:13 ` [edk2-devel] [PATCH 04/16] UefiCpuPkg/CcExitLib: Extend the CcExitLib library to support an SVSM Lendacky, Thomas via groups.io
2024-02-02  6:06   ` Ni, Ray
2024-01-26 22:13 ` [edk2-devel] [PATCH 05/16] Ovmfpkg/CcExitLib: Extend CcExitLib to handle SVSM related services Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 06/16] OvmfPkg: Create a calling area used to communicate with the SVSM Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 07/16] OvmfPkg/CcExitLib: Add support for the SVSM_CORE_PVALIDATE call Lendacky, Thomas via groups.io
2024-01-29 14:40   ` Gerd Hoffmann
2024-01-29 17:34     ` Lendacky, Thomas via groups.io
2024-01-31 18:40       ` Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 08/16] OvmfPkg/CcExitLib: Add support for the SVSM create/delete vCPU calls Lendacky, Thomas via groups.io
2024-01-29 14:46   ` Gerd Hoffmann
2024-01-29 17:37     ` Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 09/16] UefiCpuPkg/MpInitLib: Use CcExitSnpVmsaRmpAdjust() to set/clear VMSA Lendacky, Thomas via groups.io
2024-02-02  6:07   ` Ni, Ray
2024-01-26 22:13 ` [edk2-devel] [PATCH 10/16] MdePkg: GHCB APIC ID retrieval support definitions Lendacky, Thomas via groups.io
2024-01-29 14:52   ` Gerd Hoffmann
2024-01-26 22:13 ` [edk2-devel] [PATCH 11/16] UefiCpuPkg: Create APIC ID list PCD Lendacky, Thomas via groups.io
2024-01-29 14:57   ` Gerd Hoffmann
2024-02-02  6:08   ` Ni, Ray
2024-02-02 22:56     ` Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 12/16] OvmfPkg/PlatformPei: Retrieve APIC IDs from the hypervisor Lendacky, Thomas via groups.io
2024-01-29 15:00   ` Gerd Hoffmann
2024-01-29 17:49     ` Lendacky, Thomas via groups.io
2024-01-30 11:25       ` Gerd Hoffmann
2024-01-26 22:13 ` [edk2-devel] [PATCH 13/16] UefiCpuPkg/MpInitLib: Always use AP Create if PcdSevSnpApicIds is set Lendacky, Thomas via groups.io
2024-01-29 15:21   ` Gerd Hoffmann
2024-01-29 18:00     ` Lendacky, Thomas via groups.io
2024-02-02  6:20   ` Ni, Ray
2024-02-02 22:58     ` Lendacky, Thomas via groups.io
2024-02-05  5:06       ` Ni, Ray
2024-01-26 22:13 ` [edk2-devel] [PATCH 14/16] UefiCpuPkg/MpInitLib: AP creation support under an SVSM Lendacky, Thomas via groups.io
2024-01-29 15:21   ` Gerd Hoffmann
2024-02-02  6:48   ` Ni, Ray
2024-01-26 22:13 ` [edk2-devel] [PATCH 15/16] Ovmfpkg/CcExitLib: Provide SVSM discovery support Lendacky, Thomas via groups.io
2024-01-29 15:23   ` Gerd Hoffmann
2024-01-29 18:04     ` Lendacky, Thomas via groups.io
2024-01-30 11:38       ` Gerd Hoffmann
2024-01-30 16:13         ` Lendacky, Thomas via groups.io
2024-01-26 22:13 ` [edk2-devel] [PATCH 16/16] OvmfPkg/BaseMemEncryptLib: Check for presence of an SVSM when not at VMPL0 Lendacky, Thomas via groups.io
2024-01-29 15:24   ` Gerd Hoffmann
2024-01-27  4:04 ` [edk2-devel] [PATCH 00/16] Provide SEV-SNP support for running under an SVSM Yao, Jiewen
2024-01-27 17:48   ` Lendacky, Thomas via groups.io
2024-01-28  4:11     ` Yao, Jiewen
     [not found]     ` <17AE677D909D4A42.23935@groups.io>
2024-02-09  8:11       ` Yao, Jiewen
2024-02-09 16:17         ` Lendacky, Thomas via groups.io

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=2deccf7e-6ff9-4362-8bb8-5de2239cc653@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