Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: c4bc1a9498f4e176cefaeba3211287b444a53882
https://github.com/tianocore/edk2/commit/c4bc1a9498f4e176cefaeba3211287b444a53882
Author: Min M Xu <[email protected]>
Date: 2022-09-06 (Tue, 06 Sep 2022)
Changed paths:
A OvmfPkg/Library/CcProbeLib/SecPeiCcProbeLib.c
A OvmfPkg/Library/CcProbeLib/SecPeiCcProbeLib.inf
Log Message:
-----------
OvmfPkg: Add SecPeiCcProbeLib
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3974
SecPeiCcProbeLib is designed to probe the Confidential Computing guest
type in SEC/PEI phase. The CC guest type was set by each CC guest at
the beginning of boot up and saved in PcdOvmfWorkArea.
Cc: Erdem Aktas <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Min Xu <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Commit: 1b1c58ab32c30d32ba7d037c0ea1da198c1b372b
https://github.com/tianocore/edk2/commit/1b1c58ab32c30d32ba7d037c0ea1da198c1b372b
Author: Min M Xu <[email protected]>
Date: 2022-09-06 (Tue, 06 Sep 2022)
Changed paths:
M OvmfPkg/IntelTdx/IntelTdxX64.dsc
R OvmfPkg/Library/CcProbeLib/CcProbeLib.c
R OvmfPkg/Library/CcProbeLib/CcProbeLib.inf
A OvmfPkg/Library/CcProbeLib/DxeCcProbeLib.c
A OvmfPkg/Library/CcProbeLib/DxeCcProbeLib.inf
M OvmfPkg/OvmfPkgX64.dsc
Log Message:
-----------
OvmfPkg: Update CcProbeLib to DxeCcProbeLib
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3974
CcProbeLib once was designed to probe the Confidential Computing guest
type by checking the PcdOvmfWorkArea. But this memory is allocated with
either EfiACPIMemoryNVS or EfiBootServicesData. It cannot be accessed
after ExitBootService. Please see the detailed analysis in BZ#3974.
To fix this issue, CcProbeLib is redesigned as 2 implementation:
- SecPeiCcProbeLib
- DxeCcProbeLib
In SecPeiCcProbeLib we check the CC guest type by reading the
PcdOvmfWorkArea. Because it is used in SEC / PEI and we don't worry about
the issues in BZ#3974.
In DxeCcProbeLib we cache the GuestType in Ovmf work area in a variable.
After that the Guest type is returned with the cached value. So that we
don't need to worry about the access to Ovmf work area after
ExitBootService.
The reason why we probe CC guest type in 2 different ways is the global
varialbe. Global variable cannot be used in SEC/PEI and CcProbe is called
very frequently.
Cc: Gerd Hoffmann <[email protected]>
Cc: Erdem Aktas <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Jiewen Yao <[email protected]>
Cc: Tom Lendacky <[email protected]>
Signed-off-by: Min Xu <[email protected]>
Acked-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Jiewen Yao <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/c05a218a9758...1b1c58ab32c3
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits