* [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe
@ 2022-12-22 13:11 Min Xu
2022-12-22 13:11 ` [PATCH V1 1/2] OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr Min Xu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Min Xu @ 2022-12-22 13:11 UTC (permalink / raw)
To: devel
Cc: Min Xu, Ard Biesheuvel, Leif Lindholm, Sami Mujawar,
Gerd Hoffmann, Erdem Aktas, James Bottomley, Jiewen Yao,
Tom Lendacky
PcdConfidentialComputingGuestAttr can be used to check the cc guest
type, including td-guest or sev-guest. CcProbe() can do the same
thing but CcProbeLib should be included in the dsc which uses
AcpiPlatformDxe. The difference between PcdConfidentialComputingGuestAttr
and CcProbe() is that PcdConfidentialComputingGuestAttr cannot be used
in multi-processor scenario but CcProbe() can. But there is no such
issue in AcpiPlatformDxe.
So we use PcdConfidentialComputingGuestAttr instead of CcProbeLib so that
it is simpler.
After CcProbe is removed from AcpiPlatformDxe, it is removed
from ArmVirtQemu.dsc as well.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Min M Xu (2):
OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr
ArmVirtPkg: Remove CcProbeLib from ArmVirtQemu.dsc
ArmVirtPkg/ArmVirtQemu.dsc | 1 -
OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 6 ++----
OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 +-
3 files changed, 3 insertions(+), 6 deletions(-)
--
2.29.2.windows.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V1 1/2] OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr
2022-12-22 13:11 [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe Min Xu
@ 2022-12-22 13:11 ` Min Xu
2022-12-22 13:11 ` [PATCH V1 2/2] ArmVirtPkg: Remove CcProbeLib from ArmVirtQemu.dsc Min Xu
2022-12-22 13:20 ` [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe Ard Biesheuvel
2 siblings, 0 replies; 4+ messages in thread
From: Min Xu @ 2022-12-22 13:11 UTC (permalink / raw)
To: devel
Cc: Min M Xu, Ard Biesheuvel, Erdem Aktas, James Bottomley,
Jiewen Yao, Gerd Hoffmann, Tom Lendacky
From: Min M Xu <min.m.xu@intel.com>
PcdConfidentialComputingGuestAttr can be used to check the cc guest
type, including td-guest or sev-guest. CcProbe() can do the same
thing but CcProbeLib should be included in the dsc which uses
AcpiPlatformDxe. The difference between PcdConfidentialComputingGuestAttr
and CcProbe() is that PcdConfidentialComputingGuestAttr cannot be used
in multi-processor scenario but CcProbe() can. But there is no such
issue in AcpiPlatformDxe.
So we use PcdConfidentialComputingGuestAttr instead of CcProbeLib so that
it is simpler.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
---
OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 6 ++----
OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
index 0cc3d958bed4..b446bb487234 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
@@ -8,9 +8,7 @@
**/
#include <OvmfPlatforms.h> // CLOUDHV_DEVICE_ID
-
-#include <Library/CcProbeLib.h> // CcProbe(), CcGuestTypeIntelTdx
-
+#include <ConfidentialComputingGuestAttr.h>
#include "AcpiPlatform.h"
/**
@@ -35,7 +33,7 @@ InstallAcpiTables (
HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
if (HostBridgeDevId == CLOUDHV_DEVICE_ID) {
- if (CcProbe () == CcGuestTypeIntelTdx) {
+ if (CC_GUEST_IS_TDX (PcdGet64 (PcdConfidentialComputingGuestAttr))) {
Status = InstallCloudHvTablesTdx (AcpiTable);
} else {
Status = InstallCloudHvTables (AcpiTable);
diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
index 1647a90add8b..8939dde42549 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
+++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf
@@ -46,7 +46,6 @@
UefiBootServicesTableLib
UefiDriverEntryPoint
HobLib
- CcProbeLib
[Protocols]
gEfiAcpiTableProtocolGuid # PROTOCOL ALWAYS_CONSUMED
@@ -62,6 +61,7 @@
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr
gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize
+ gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr
[Depex]
gEfiAcpiTableProtocolGuid
--
2.29.2.windows.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH V1 2/2] ArmVirtPkg: Remove CcProbeLib from ArmVirtQemu.dsc
2022-12-22 13:11 [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe Min Xu
2022-12-22 13:11 ` [PATCH V1 1/2] OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr Min Xu
@ 2022-12-22 13:11 ` Min Xu
2022-12-22 13:20 ` [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe Ard Biesheuvel
2 siblings, 0 replies; 4+ messages in thread
From: Min Xu @ 2022-12-22 13:11 UTC (permalink / raw)
To: devel; +Cc: Min M Xu, Ard Biesheuvel, Leif Lindholm, Sami Mujawar,
Gerd Hoffmann
From: Min M Xu <min.m.xu@intel.com>
Since CcProbeLib is not used in AcpiPlatformDxe, CcProbeLib can be removed
from ArmVirtQemu.dsc.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
---
ArmVirtPkg/ArmVirtQemu.dsc | 1 -
1 file changed, 1 deletion(-)
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 1dea715e9e4b..f77443229e8e 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -68,7 +68,6 @@
VirtNorFlashPlatformLib|ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.inf
CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
- CcProbeLib|MdePkg/Library/CcProbeLibNull/CcProbeLibNull.inf
BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf
--
2.29.2.windows.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe
2022-12-22 13:11 [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe Min Xu
2022-12-22 13:11 ` [PATCH V1 1/2] OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr Min Xu
2022-12-22 13:11 ` [PATCH V1 2/2] ArmVirtPkg: Remove CcProbeLib from ArmVirtQemu.dsc Min Xu
@ 2022-12-22 13:20 ` Ard Biesheuvel
2 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2022-12-22 13:20 UTC (permalink / raw)
To: Min Xu
Cc: devel, Ard Biesheuvel, Leif Lindholm, Sami Mujawar, Gerd Hoffmann,
Erdem Aktas, James Bottomley, Jiewen Yao, Tom Lendacky
On Thu, 22 Dec 2022 at 14:12, Min Xu <min.m.xu@intel.com> wrote:
>
> PcdConfidentialComputingGuestAttr can be used to check the cc guest
> type, including td-guest or sev-guest. CcProbe() can do the same
> thing but CcProbeLib should be included in the dsc which uses
> AcpiPlatformDxe. The difference between PcdConfidentialComputingGuestAttr
> and CcProbe() is that PcdConfidentialComputingGuestAttr cannot be used
> in multi-processor scenario but CcProbe() can. But there is no such
> issue in AcpiPlatformDxe.
>
> So we use PcdConfidentialComputingGuestAttr instead of CcProbeLib so that
> it is simpler.
>
> After CcProbe is removed from AcpiPlatformDxe, it is removed
> from ArmVirtQemu.dsc as well.
>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Sami Mujawar <sami.mujawar@arm.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Erdem Aktas <erdemaktas@google.com>
> Cc: James Bottomley <jejb@linux.ibm.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Signed-off-by: Min Xu <min.m.xu@intel.com>
>
> Min M Xu (2):
> OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr
> ArmVirtPkg: Remove CcProbeLib from ArmVirtQemu.dsc
>
Thanks for the quick fix!
PR queued as #3821
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-12-22 13:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-22 13:11 [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe Min Xu
2022-12-22 13:11 ` [PATCH V1 1/2] OvmfPkg/AcpiPlatformDxe: Check PcdConfidentialComputingGuestAttr Min Xu
2022-12-22 13:11 ` [PATCH V1 2/2] ArmVirtPkg: Remove CcProbeLib from ArmVirtQemu.dsc Min Xu
2022-12-22 13:20 ` [PATCH V1 0/2] Check PcdConfidentialComputingGuestAttr in AcpiPlatformDxe Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox