Re: [edk2-devel] [PATCH v2 1/1] OvmfPkg/ResetVector: send post codes to qemu debug console

2024-01-26 Thread Erdem Aktas via groups.io
On Fri, Jan 26, 2024 at 8:16 AM Tom Lendacky wrote: > > On 1/26/24 08:29, Gerd Hoffmann wrote: > > Neat when doing ResetVector coding. > > Incompatible with TDX and SEV, therefore not enabled by default. > > > > Signed-off-by: Gerd Hoffmann > > Acked-by: Tom Lendacky > Acked-by: Erdem Aktas > >

Re: [edk2-devel] [PATCH 1/1] OvmfPkg/ResetVector: send post codes to qemu debug console

2024-01-24 Thread Erdem Aktas via groups.io
Same for TDX, I did not run it but it should cause failure as debugShowPostCode is called OvmfPkg/ResetVector/Ia32/IntelTdx.asm before actually the #VE handlers are installed. -Erdem On Wed, Jan 24, 2024 at 11:55 AM Tom Lendacky wrote: > On 1/24/24 13:24, Tom Lendacky wrote: > > On 1/24/24 10:4

Re: [edk2-devel] [PATCH V1 2/2] OvmfPkg/BaseMemEncryptTdxLib: Handle retry result of MapGPA

2023-10-30 Thread Erdem Aktas via groups.io
On Sun, Oct 29, 2023 at 11:42 PM Sun, CepingX wrote: > > On Saturday, October 28, 2023 12:45 AM, Erdem Aktas wrote: > This should be the [PATCH V1 2/2] I assume? > Yes, the name is same with [PATCH v1 0/2] , may be confusion, I would update > in next version to avoid the same title name. > > > On

Re: [edk2-devel] [PATCH V1 2/2] OvmfPkg/BaseMemEncryptTdxLib: Handle retry result of MapGPA

2023-10-27 Thread Erdem Aktas via groups.io
Hi, This should be the [PATCH V1 2/2] I assume? On Thu, Oct 26, 2023 at 5:58 PM sunceping wrote: > From: Ceping Sun > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4572 > > According to section 3.2 of the [GHCI] document, if the result of MapGPA > is "TDG.VP.VMCALL_RETRY", TDVF must re

Re: [edk2-devel] [PATCH V1] OvmfPkg/PeilessStartupLib: Updated with PcdSecureBootSupported

2023-07-17 Thread Erdem Aktas via groups.io
Reviewed-by: Erdem Aktas On Sun, Jul 16, 2023 at 6:55 PM Yao, Jiewen wrote: > > Reviewed-by: Jiewen Yao > > > -Original Message- > > From: devel@edk2.groups.io On Behalf Of Gerd > > Hoffmann > > Sent: Monday, July 10, 2023 6:36 PM > > To: devel@edk2.groups.io; Sun, CepingX > > Cc: Ak

Re: [edk2-devel] [PATCH V3 04/29] OvmfPkg: Extend VmgExitLib to handle #VE exception

2021-11-16 Thread Erdem Aktas via groups.io
Hi Min, On Mon, Nov 1, 2021 at 6:16 AM Min Xu wrote: > > +VmTdExitHandleVe ( > + IN OUT EFI_EXCEPTION_TYPE *ExceptionType, > + IN OUT EFI_SYSTEM_CONTEXT SystemContext > + ) > +{ > + UINT64Status; > + TD_RETURN_DATAReturnData; > + EFI_SYSTEM_CONTEXT_X64

Re: [edk2-devel] [PATCH V3 02/29] MdePkg: Add TdxLib to wrap Tdx operations

2021-11-10 Thread Erdem Aktas via groups.io
Hi Min, Sorry for the late review. My comments and a few questions are inline. Thanks -Erdem On Mon, Nov 1, 2021 at 6:16 AM Min Xu wrote: > > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 > > +**/ > +UINT32 > +GetGpaPageLevel ( > + UINT32 PageSize > + ) > +{ > + UINT32 Index

Re: [edk2-devel] [PATCH v7 09/31] OvmfPkg/SecMain: register GHCB gpa for the SEV-SNP guest

2021-09-15 Thread Erdem Aktas via groups.io
On Mon, Sep 13, 2021 at 9:20 PM Brijesh Singh wrote: > +*/ > +STATIC > +VOID > +SevSnpGhcbRegister ( > + UINTN Address > + ) > +{ > + MSR_SEV_ES_GHCB_REGISTER Msr; > + MSR_SEV_ES_GHCB_REGISTER CurrentMsr; > + EFI_PHYSICAL_ADDRESS GuestFrameNumber; > + > + GuestFrameNumber = Address

Re: [edk2-devel] [PATCH 03/23] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf

2021-09-13 Thread Erdem Aktas via groups.io
On Mon, Sep 13, 2021 at 9:06 AM Xu, Min M wrote: > > > > +TdxApWait: > > > +cmp byte[TDX_WORK_AREA_PGTBL_READY], 0 > > > +je TdxApWait > > Don't we need memory fence before je TdxApWait. I did not check > > what the compiler generates for this loop. > Below is the code compi

Re: [edk2-devel] [PATCH V5 2/2] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf

2021-09-10 Thread Erdem Aktas via groups.io
On Mon, Aug 30, 2021 at 5:35 AM Min Xu wrote: > +; > +; Check if it is Intel Tdx > +; > +; Modified: EAX, EBX, ECX, EDX > +; > +; If it is Intel Tdx, EAX is zero > +; If it is not Intel Tdx, EAX is non-zero > +; > +IsTdx: IsTdx returns 0 when TDX is enabled in CPUID but IsTdxEnabled return 1 when

Re: [edk2-devel] [PATCH 07/23] MdePkg: Update BaseIoLibIntrinsicSev to support Tdx

2021-09-10 Thread Erdem Aktas via groups.io
On Thu, Aug 12, 2021 at 2:57 PM Min Xu wrote: > +UINT8 > +EFIAPI > +TdMmioRead8 ( > + IN UINTN Address > + ) > +{ > + UINT64 Value; > + UINT64 Status; > + > + Address |= TdSharedPageMask (); Why is the SharedBi

Re: [edk2-devel] [PATCH 06/23] MdePkg: Add TdxLib to wrap Tdx operations

2021-09-10 Thread Erdem Aktas via groups.io
On Thu, Aug 12, 2021 at 2:57 PM Min Xu wrote: > - TdMaxVCpuNum: Get the maximum number of virutal CPUs. s/virutal/virtual > - TdVCpuNum : Get the number of virtual CPUs. (In some case VMM may > add more vCPU in runtime). s/case/cases How is this possible consideri

Re: [edk2-devel] [PATCH 05/23] MdePkg: Add TdxProbeLib to probe Intel Tdx

2021-09-10 Thread Erdem Aktas via groups.io
On Thu, Aug 12, 2021 at 2:57 PM Min Xu wrote: > + > +#include > +#include "InternalTdxProbe.h" > + > +/** > + TDX only works in X64. So allways return -1 to indicate Non-Td. s/allways/always Also, -1 or 1? PROBE_NOT_TD_GUEST is defined as 1. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receiv

Re: [edk2-devel] [PATCH 03/23] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf

2021-09-10 Thread Erdem Aktas via groups.io
On Thu, Aug 12, 2021 at 2:57 PM Min Xu wrote: > > +; > +; Check if it is Intel Tdx > +; > +; Modified: EAX, EBX, ECX, EDX > +; > +; If it is Intel Tdx, EAX is zero > +; If it is not Intel Tdx, EAX is non-zero > +; > +IsTdx: IsTdx returns 0 when TDX is enabled in CPUID but IsTdxEnabled return 1 whe

Re: [edk2-devel] [PATCH 02/23] OvmfPkg/Sec: Update the check logic in SevEsIsEnabled

2021-09-10 Thread Erdem Aktas via groups.io
On Thu, Aug 12, 2021 at 2:57 PM Min Xu wrote: > > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 > > SevEsIsEnabled return TRUE if SevEsWorkArea->SevEsEnabled is non-zero. s/return/returns > It is correct when SevEsWorkArea is only used by SEV. After Intel TDX > is enabled in Ovmf, the

Re: [edk2-devel] [PATCH V5 1/2] OvmfPkg: Introduce Tdx BFV/CFV PCDs and PcdOvmfImageSizeInKb

2021-09-10 Thread Erdem Aktas via groups.io
I have few naive questions. Sorry if the answers were obvious. >>TDVF also include a configuration firmware volume (CFV) that is separated >>from the BFV. The reason is because the CFV is measured in RTMR, while >>the BFV is measured in MRTD. If I understand correctly, this means that the BFV is

Re: [edk2-devel] [PATCH V4 3/3] OvmfPkg/ResetVector: Enable Intel TDX in ResetVector of Ovmf

2021-08-04 Thread Erdem Aktas via groups.io
I agree with Brijesh on that this patch should be divided into smaller ones. On Mon, Aug 2, 2021 at 6:18 PM Min Xu wrote: > > +; > +; EBP[6:0] CPU supported GPA width > +; > +and ebp, 0x3f Based on https://software.intel.com/content/dam/develop/external/us/en/documents/tdx-m

Re: [edk2-devel] [PATCH V4 1/3] OvmfPkg: Add Tdx BFV/CFV PCDs and PcdOvmfImageSizeInKb

2021-08-04 Thread Erdem Aktas via groups.io
Reviewed-by: Erdem Aktas On Mon, Aug 2, 2021 at 6:18 PM Min Xu wrote: > > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 > > Tdx Virtual Firmware (TDVF) includes one Firmware Volume (FV) known > as the Boot Firmware Volume (BFV). The FV format is defined in the > UEFI Platform Initial

Re: [edk2-devel] [RFC PATCH v5 07/28] OvmfPkg/ResetVector: pre-validate the data pages used in SEC phase

2021-07-31 Thread Erdem Aktas via groups.io
On Wed, Jun 30, 2021 at 5:54 AM Brijesh Singh wrote: > > a) Enhance the OVMF reset vector code to validate the pages as described >above (go through step 2 - 3). > OR > b) Validate the pages during the guest creation time. The SEV firmware >provides a command which can be used by the VMM t

Re: [edk2-rfc] [edk2-devel] RFC: design review for TDVF in OVMF

2021-06-10 Thread Erdem Aktas via groups.io
Hi all, Sorry for the late reply. I like to add some clarification on "one binary". I feel like the way everyone uses the term "one binary" in the email threads is causing some confusion. As I have tried to explain before, we are not looking for everything in a single binary. As Laszlo has menti

Re: [edk2-devel] [PATCH v3 09/13] OvmfPkg/BaseMemEncryptSevLib: introduce MemEncryptSevClearMmioPageEncMask()

2021-05-28 Thread Erdem Aktas via groups.io
> + @param[in] BaseAddress The physical address that is the start > + address of a MMIO region. Based on the code, what I understand is that the address parameters should be "guest virtual address", not the physical address. But in this patch, all

Re: [edk2-devel] [PATCH v3 08/13] MdePkg/BaseLib: add support for RMPADJUST instruction

2021-05-28 Thread Erdem Aktas via groups.io
>> +#define RMPADJUST_VMPL_MAX 3 Why is RMPADJUST_VMPL_MAX defined as 3? Is it not defined in bits [15:12] of CPUID Fn8000_001F[EBX]? -Erdem -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75833): https://edk2.groups.io/g/d

Re: [edk2-devel] [PATCH v2 05/13] MdePkg/Register/Amd: define GHCB macro for the Page State Change

2021-05-17 Thread Erdem Aktas via groups.io
I verified that the values align with the GHCB spec publication: #56421 Revision: 2.00 Reviewed-by: Erdem Aktas On Wed, May 12, 2021 at 4:46 PM Brijesh Singh wrote: > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 > > The Page State Change NAE exit will be used by the SEV-SNP guest t

Re: [edk2-devel] [PATCH v2 04/13] MdePkg/Register/Amd: define GHCB macro for Register GPA structure

2021-05-17 Thread Erdem Aktas via groups.io
I verified that the values align with the GHCB spec publication: #56421 Revision: 2.00 Just one question: is there any reason why GHCB_* defines are decimal while the SVM_EXIT_* are all in hexadecimal? Does EDK2 have any preference? Reviewed-by: Erdem Aktas -Erdem On Wed, May 12, 2021 at 4:46

Re: [edk2-devel] [PATCH v2 03/13] MdePkg/Register/Amd: define GHCB macros for hypervisor feature detection

2021-05-17 Thread Erdem Aktas via groups.io
I verified that the values align with the GHCB spec publication: #56421 Revision: 2.00 Reviewed-by: Erdem Aktas -Erdem On Wed, May 12, 2021 at 4:46 PM Brijesh Singh wrote: > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275 > > Version 2 of GHCB introduces advertisement of features th

Re: [edk2-devel] [PATCH RFC v2 21/28] OvmfPkg/MemEncryptSevLib: Add support to validate system RAM

2021-05-03 Thread Erdem Aktas via groups.io
> +// > +// If the request page state change is shared then invalidate the pages > before > +// adding the page in the RMP table. > +// > +if (State == SevSnpPagePrivate) { > + PvalidateRange (Info, 0, i, TRUE); > +} Looks like some copy-paste mistake in the comment. A

Re: [edk2-devel] [PATCH RFC v2 17/28] OvmfPkg/ResetVector: Invalidate the GHCB page

2021-05-03 Thread Erdem Aktas via groups.io
Hi Brijesh, I have few naive questions inlined: On Fri, Apr 30, 2021 at 4:52 AM Brijesh Singh wrote: > +; Use PVALIDATE instruction to invalidate the page > +mov eax, GHCB_BASE > +mov ecx, 0 > +mov edx, 0 > +DB 0xF2, 0x0F, 0x01, 0xFF > +cmp eax, 0 > +

[edk2-devel] [PATCH] Maintainers.txt: Add 'Erdem Aktas' to Confidential Computing reviewers

2021-04-22 Thread Erdem Aktas via groups.io
Add 'Erdem Aktas' as a reviewer for OvmfPkg/Confidential Computing. Signed-off-by: Erdem Aktas --- Maintainers.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Maintainers.txt b/Maintainers.txt index fda3df5de2..cafe6b1ab8 100644 --- a/Maintainers.txt +++ b/Maintainers.txt @@ -458,6 +458,

Re: [edk2-devel] separate OVMF binary for TDX? [was: OvmfPkg: Reserve the Secrets and Cpuid page for the SEV-SNP guest]

2021-04-21 Thread Erdem Aktas via groups.io
Hi Laszlo, I am sorry to hear that it sounded like we are dictating a certain approach. Although I can see why it sounded that way, it certainly was not my intention. We want to work with the EDK2 community to have a solution that is beneficial for everyone and we appreciate the inputs that we got

Re: [edk2-devel] separate OVMF binary for TDX? [was: OvmfPkg: Reserve the Secrets and Cpuid page for the SEV-SNP guest]

2021-04-15 Thread Erdem Aktas via groups.io
Thanks Paolo. On Thu, Apr 15, 2021 at 12:59 AM Paolo Bonzini wrote: > > On 15/04/21 01:34, Erdem Aktas wrote: > > We do not want to generate different binaries for AMD, Intel, Intel > > with TDX, AMD with SEV/SNP etc > > My question is why the user would want a single binary for VMs with and > wi

Re: [edk2-devel] separate OVMF binary for TDX? [was: OvmfPkg: Reserve the Secrets and Cpuid page for the SEV-SNP guest]

2021-04-14 Thread Erdem Aktas via groups.io
Hi all, >>Can we please pry a little bit at that "one binary" requirement? I think when we call it a "one binary" requirement, it sounds like we are asking something new but what we are asking is pretty much captured by James Bottomley. We do not want to generate different binaries for AMD, Intel