[edk2-devel] [PATCH 7/7] OvmfPkg: Use newly defined Unaccepted Memory Type

2024-04-19 Thread Sachin Ganesh via groups.io
EFI_RESOURCE_MEMORY_UNACCEPTED has been officially defined in the PI 1.8 specification. So all temporary solutions have been replaced with the actual definition. Cc: Felix Polyudov Cc: Dhanaraj V Cc: Jiewen Yao Cc: Liming Gao Signed-off-by: Sachin Ganesh --- OvmfPkg/AmdSevDxe/AmdSevDxe.c

[edk2-devel] [PATCH 5/7] MdePkg: Update Delayed Dispatch PPI as per PI 1.8 Spec

2024-04-19 Thread Sachin Ganesh via groups.io
Added WaitOnEvent() function to EFI_DELAYTED_DISPATCH_PPI. Modified DispatchRegister() parameter list. Cc: Felix Polyudov Cc: Dhanaraj V Cc: Liming Gao Signed-off-by: Sachin Ganesh --- MdePkg/Include/Ppi/DelayedDispatch.h | 24 +++- 1 file changed, 23 insertions(+), 1

[edk2-devel] [PATCH 6/7] MdePkg: Update to PI 1.8 Revision

2024-04-19 Thread Sachin Ganesh via groups.io
Revision macros have been updated to indicate PI 1.8 specification support Cc: Felix Polyudov Cc: Dhanaraj V Cc: Liming Gao Signed-off-by: Sachin Ganesh --- MdePkg/Include/Pi/PiDxeCis.h | 6 +++--- MdePkg/Include/Pi/PiMmCis.h | 6 +++--- MdePkg/Include/Pi/PiMultiPhase.h | 6 ++

[edk2-devel] [PATCH 2/7] MdePkg: Add new Resource Attributes defined in PI 1.8 Spec

2024-04-19 Thread Sachin Ganesh via groups.io
Defined Encrypted and Special Purpose resource attributes as defined in PI 1.8 Specification Cc: Felix Polyudov Cc: Dhanaraj V Cc: Liming Gao Signed-off-by: Sachin Ganesh --- MdePkg/Include/Pi/PiHob.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdePkg/Include/Pi/PiHob.h

[edk2-devel] [PATCH 3/7] MdePkg: Define Unaccepted Memory Type

2024-04-19 Thread Sachin Ganesh via groups.io
EFI_RESOURCE_MEMORY_UNACCEPTED has been officially defined in the PI 1.8 specification. So all temporary solutions have been replaced with the actual definition. Cc: Felix Polyudov Cc: Dhanaraj V Cc: Liming Gao Signed-off-by: Sachin Ganesh --- MdePkg/Include/Pi/PiDxeCis.h | 13 +

[edk2-devel] [PATCH 4/7] MdeModulePkg: Use newly defined Unaccepted Memory Type

2024-04-19 Thread Sachin Ganesh via groups.io
EFI_RESOURCE_MEMORY_UNACCEPTED has been officially defined in the PI 1.8 specification. So all temporary solutions have been replaced with the actual definition. Cc: Felix Polyudov Cc: Dhanaraj V Cc: Liming Gao Signed-off-by: Sachin Ganesh --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 10

[edk2-devel] [PATCH 1/7] MdePkg: Add definition for NVMe Over Fabric Device Path

2024-04-19 Thread Sachin Ganesh via groups.io
In accordance with UEFI 2.10 Specification: Adding definition for NVMe Over Fabric (NVMe-oF) Device Path of Messaging Sub-Type. Cc: Felix Polyudov Cc: Dhanaraj V Cc: Liming Gao Signed-off-by: Sachin Ganesh --- MdePkg/Include/Protocol/DevicePath.h | 22 ++ 1 file changed,

[edk2-devel] [PATCH 0/7] General Updates based on UEFI 2.10 and PI 1.8 Specification

2024-04-19 Thread Sachin Ganesh via groups.io
This series of patches are for general updates to MdePkg and MdeModulePkg based on UEFI 2.10 and PI 1.8 Specifications Sachin Ganesh (7): MdePkg: Add definition for NVMe Over Fabric Device Path MdePkg: Add new Resource Attributes defined in PI 1.8 Spec MdePkg: Define Unaccepted Memory Type

[edk2-devel] [PATCH] ArmVirtPkg/ArmVirtQemu: always build XIP code with strict alignment

2024-04-19 Thread Ard Biesheuvel via groups.io
From: Ard Biesheuvel The optimization that enabled entry with MMU and caches enabled at EL1 removed the strict alignment requirement for XIP code (roughly, any code that might execute with the MMU and caches off, which means SEC and PEI phase modules but also *all* BASE libraries), on the basis

[edk2-devel] [PATCH v2] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-19 Thread Adam Dunlap via groups.io
Ensure that when a #VC exception happens, the instruction at the instruction pointer matches the instruction that is expected given the error code. This is to mitigate the ahoi WeSee attack [1] that could allow hypervisors to breach integrity and confidentiality of the firmware by maliciously

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-19 Thread Adam Dunlap via groups.io
On Fri, Apr 19, 2024 at 8:13 AM Tom Lendacky wrote: > > On 4/17/24 11:54, Adam Dunlap wrote: > > + > > +case SVM_EXIT_INVD: > > + break; > > This changes the current behavior today, but I'm ok with that. > Whoops, I should've checked that. Should we delete InvdExit() then, if it's dead

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Ard Biesheuvel
On Fri, 19 Apr 2024 at 18:36, Ard Biesheuvel wrote: > > On Fri, 19 Apr 2024 at 18:09, Jonathan Cameron via groups.io > wrote: > > > > On Fri, 19 Apr 2024 13:52:07 +0200 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > Gerd, any ideas? Maybe I needs something subtly different in my > > >

Re: [edk2-devel] [edk2-libc Patch v3 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-19 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: Jayaprakash, N > Sent: Friday, April 19, 2024 2:01 AM > To: devel@edk2.groups.io > Cc: Jayaprakash, N ; Rebecca Cran > ; Kinney, Michael D > Subject: [edk2-libc Patch v3 1/1] ek2-libc: wrmsr function available > in edk2module

Re: [edk2-devel] [PATCH V3 6/6] Maintainers.txt: Update maintainer for SPI modules

2024-04-19 Thread Michael D Kinney
Reviewed-by: Michael D Kinney > -Original Message- > From: devel@edk2.groups.io On Behalf Of Chang, > Abner via groups.io > Sent: Friday, April 19, 2024 12:40 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Andrew Fish > ; Leif Lindholm ; Attar, > AbdulLateef (Abdul Lateef) ;

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Ard Biesheuvel
On Fri, 19 Apr 2024 at 18:09, Jonathan Cameron via groups.io wrote: > > On Fri, 19 Apr 2024 13:52:07 +0200 > Gerd Hoffmann wrote: > > > Hi, > > > > > Gerd, any ideas? Maybe I needs something subtly different in my > > > edk2 build? I've not looked at this bit of the qemu infrastructure > > >

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Jonathan Cameron via groups.io
On Fri, 19 Apr 2024 13:52:07 +0200 Gerd Hoffmann wrote: > Hi, > > > Gerd, any ideas? Maybe I needs something subtly different in my > > edk2 build? I've not looked at this bit of the qemu infrastructure > > before - is there a document on how that image is built? > > There is

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-19 Thread Lendacky, Thomas via groups.io
On 4/17/24 11:54, Adam Dunlap wrote: Ensure that when a #VC exception happens, the instruction at the instruction pointer matches the instruction that is expected given the error code. This is to mitigate the ahoi WeSee attack [1] that could allow hypervisors to breach integrity and

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-19 Thread Lendacky, Thomas via groups.io
On 4/18/24 07:15, Gerd Hoffmann via groups.io wrote: On Wed, Apr 17, 2024 at 09:54:00AM -0700, Adam Dunlap via groups.io wrote: Ensure that when a #VC exception happens, the instruction at the instruction pointer matches the instruction that is expected given the error code. This is to mitigate

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Ard Biesheuvel
On Fri, 19 Apr 2024 at 15:00, Chang, Abner wrote: > > [AMD Official Use Only - General] > > I guess my RB misled contributors thought the patch is good to merge. > However, I was thinking Eric's team should give the final RB after the > validation as they are the maintainers for the subordinate

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] I guess my RB misled contributors thought the patch is good to merge. However, I was thinking Eric's team should give the final RB after the validation as they are the maintainers for the subordinate VanGoghBoard platform. Suppose the impacted packages should

[edk2-devel] [PATCH v2 5/5] OvmfPkg/VirtHstiDxe: add README.md

2024-04-19 Thread Gerd Hoffmann
Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Konstantin Kostiuk Signed-off-by: Gerd Hoffmann --- OvmfPkg/VirtHstiDxe/README.md | 48 +++ 1 file changed, 48 insertions(+) create mode 100644 OvmfPkg/VirtHstiDxe/README.md diff --git a/OvmfPkg/VirtHstiDxe/README.md

[edk2-devel] [PATCH v2 4/5] OvmfPkg/VirtHstiDxe: add code flash check

2024-04-19 Thread Gerd Hoffmann
Detects qemu config issue: code pflash is writable. Checked for both PC and Q35. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Konstantin Kostiuk Signed-off-by: Gerd Hoffmann --- OvmfPkg/VirtHstiDxe/VirtHstiDxe.inf | 2 ++ OvmfPkg/VirtHstiDxe/VirtHstiDxe.h | 13 +++

[edk2-devel] [PATCH v2 1/5] OvmfPkg: Add VirtHstiDxe driver

2024-04-19 Thread Gerd Hoffmann
From: Konstantin Kostiuk The driver supports qemu machine types 'pc' and 'q35'. This patch adds some helper functions to manage the bitmasks. The implemented features depend on both OVMF build configuration and qemu VM configuration. For q35 a single security feature is supported and checked:

[edk2-devel] [PATCH v2 3/5] OvmfPkg/VirtHstiDxe: add varstore flash check

2024-04-19 Thread Gerd Hoffmann
Detects qemu config issue: vars pflash is not in secure mode (write access restricted to smm). Applies to Q35 with SMM only. Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Konstantin Kostiuk Signed-off-by: Gerd Hoffmann --- OvmfPkg/VirtHstiDxe/VirtHstiDxe.inf | 4 ++

[edk2-devel] [PATCH v2 2/5] OvmfPkg: Add VirtHstiDxe to OVMF firmware build

2024-04-19 Thread Gerd Hoffmann
From: Konstantin Kostiuk Cc: Ard Biesheuvel Cc: Jiewen Yao Signed-off-by: Konstantin Kostiuk Signed-off-by: Gerd Hoffmann --- OvmfPkg/OvmfPkgIa32.dsc| 2 ++ OvmfPkg/OvmfPkgIa32X64.dsc | 2 ++ OvmfPkg/OvmfPkgX64.dsc | 2 ++ OvmfPkg/OvmfPkgIa32.fdf| 1 + OvmfPkg/OvmfPkgIa32X64.fdf

[edk2-devel] [PATCH v2 0/5] OvmfPkg: Add VirtHstiDxe driver

2024-04-19 Thread Gerd Hoffmann
v2: - remove 'Q35' from test bits - add patch with a README.md Gerd Hoffmann (3): OvmfPkg/VirtHstiDxe: add varstore flash check OvmfPkg/VirtHstiDxe: add code flash check OvmfPkg/VirtHstiDxe: add README.md Konstantin Kostiuk (2): OvmfPkg: Add VirtHstiDxe driver OvmfPkg: Add

Re: [edk2-devel] [PATCH V2 1/1] OvmfPkg/IntelTdx: Update TDVF README

2024-04-19 Thread Gerd Hoffmann
On Fri, Apr 19, 2024 at 08:11:27AM +0800, Min Xu wrote: > From: Min M Xu > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4756 > > There are below updates in this patch: > 1. Rename README to README.md so that it can be show as markdown >document. > 2. Update some information about

Re: [edk2-devel] [PATCH v3 5/6] target/arm: Do memory type alignment check when translation disabled

2024-04-19 Thread Gerd Hoffmann
Hi, > Gerd, any ideas? Maybe I needs something subtly different in my > edk2 build? I've not looked at this bit of the qemu infrastructure > before - is there a document on how that image is built? There is roms/Makefile for that. make -C roms help make -C roms efi So easiest would be to

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Xing, Eric via groups.io
[AMD Official Use Only - General] Hi Ard, Agree with you, reverting code looks not a good way now. We will think about new method to resolve this issue. Just need a bit more time and I will hold on checking in code to VanGoghBoard before it. Thanks again for your suggestion and help us improve

Re: [edk2-devel] [PATCH] OvmfPkg: Harden #VC instruction emulation somewhat (CVE-2024-25742)

2024-04-19 Thread Gerd Hoffmann
On Thu, Apr 18, 2024 at 08:39:20AM -0700, Adam Dunlap wrote: > On Thu, Apr 18, 2024 at 5:15 AM Gerd Hoffmann wrote: > > > > On Wed, Apr 17, 2024 at 09:54:00AM -0700, Adam Dunlap via groups.io wrote: > > > + UINT8 OpCode; > > > > The linux kernel patch uses "unsigned int opcode" and apparently >

Re: [edk2-devel] [PATCH v2] XiangshanSeriesPkg:Add BOSC NanhuDev platform

2024-04-19 Thread Sunil V L
On Wed, Apr 10, 2024 at 01:50:12PM +0800, WangYang wrote: > This commit adds the initial support for BOSC's > nanhu platform which provides up to 2 RISC-V RV64 > processor cores. > > Signed-off-by: Yang Wang > Signed-off-by: Ran Wang > Signed-off-by: YunFeng Yang > Signed-off-by: YaXing Guo >

Re: [edk2-devel] [PATCH] NetworkPkg/HttpBootDxe: Correctly uninstall HttpBootCallbackProtocol

2024-04-19 Thread Mike Beaton
Dear Michael, I don't know if you had time to answer one follow-up question. Obviously one thing that someone might want to do is to notify on protocol installs and trap installs of this protocol - e.g. so that something other than UefiBootManagerLib can manage and monitor HTTP boot, but still

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Ard Biesheuvel
On Fri, 19 Apr 2024 at 11:06, Xing, Eric wrote: > > [AMD Official Use Only - General] > > Hi Ard, > > This checkin causes VanGoghBoard build fail now. Would you help revert it? > I will merge PATCH to VanGoghBoard after the code review process done and > code changes are verified pass on real

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Xing, Eric via groups.io
[AMD Official Use Only - General] Hi Ard, This checkin causes VanGoghBoard build fail now. Would you help revert it? I will merge PATCH to VanGoghBoard after the code review process done and code changes are verified pass on real board. Thanks, Eric > -Original Message- > From: Ard

Re: [edk2-devel] [edk2-libc Patch 2 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-19 Thread Jayaprakash, N
Thanks Mike as suggested made the logic simpler. Sent the updated v3 patch for review. Regards, JP -Original Message- From: Kinney, Michael D Sent: Friday, April 19, 2024 2:35 AM To: Jayaprakash, N ; devel@edk2.groups.io Cc: Rebecca Cran ; Kinney, Michael D Subject: RE: [edk2-libc

[edk2-devel] [edk2-libc Patch v3 0/1] wrmsr function is not working as expected

2024-04-19 Thread Jayaprakash, N
The wrmsr function always writes 0s to the higher 32 bits of the msr register. This PR fixes this issue reported through the BZ4745 Jayaprakash N (1): ek2-libc: wrmsr function available in edk2module is not working as expected .../Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c

[edk2-devel] [edk2-libc Patch v3 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-19 Thread Jayaprakash, N
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4745 This commit fixes the issue reported in the BZ4745. The wrmsr was always writing 0 to the higher 32 bits of the msr register. This was due to a logical flaw in the code, where the input variable of type unsigned int was left shitted by 32

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Ard Biesheuvel
On Fri, 19 Apr 2024 at 10:10, Xing, Eric via groups.io wrote: > > [AMD Official Use Only - General] > > > Thanks Duke. > > > > Hi Thomas, > > > > PATCH1/2 still cannot be checked in because today’s VanGoghBoard is based off > EDK2_202208. Please hold on this PATCH check in. > > Apologies, but I

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Xing, Eric via groups.io
[AMD Official Use Only - General] Thanks Duke. Hi Thomas, PATCH1/2 still cannot be checked in because today’s VanGoghBoard is based off EDK2_202208. Please hold on this PATCH check in. Added my comments below. Thanks, Eric > -Original Message- > From: Zhai, MingXin

Re: [edk2-devel] [PATCH V3 6/6] Maintainers.txt: Update maintainer for SPI modules

2024-04-19 Thread Chang, Abner via groups.io
[AMD Official Use Only - General] Hi edk2 stewards, Per off-line discussion with Ray Ni, he considers Liming's RB is good enough for this patch set. Please help to review this and give your RB to the maintainship of MdeModulePkg/Bus/Spi If you don't have concerns. Thank you! Abner >

Re: [edk2-devel] [PATCH 1/2] Platform/AMD: Add AmdSvsmLib to required DSC files

2024-04-19 Thread Zhai, MingXin (Duke) via groups.io
[AMD Official Use Only - General] Hi Thomas, Yes, I agree with your opinion, edk2-platforms should be able to build against the latest edk2 repo. That is why we plan to update VanGoghBoard to support latest EDK2, In fact we are doing QA testing. I think every change on VanGoghBoard need

Re: [edk2-devel] MdeModulePkg: Fix MAT SplitRecord() Logic introduce one bug and will cause SUT reset when boot to windows

2024-04-19 Thread Ni, Ray
So this is just junk unallocated memory that we are reporting as a type it *could* be if an allocation occurs to minimize failures of ExitBootServices. Which is questionable. But in terms of attributes, I would expect we either have this unallocated memory marked the same as the bin type or