BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4654

When an SVSM is present, starting the APs requires knowledge of the APIC
IDs. Create the definitions required to retrieve and hold the APIC ID
information of all the vCPUs present in the guest.

Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com>
---
 MdePkg/Include/Register/Amd/Ghcb.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/MdePkg/Include/Register/Amd/Ghcb.h 
b/MdePkg/Include/Register/Amd/Ghcb.h
index 29b2e45d0163..cb581b14723d 100644
--- a/MdePkg/Include/Register/Amd/Ghcb.h
+++ b/MdePkg/Include/Register/Amd/Ghcb.h
@@ -56,6 +56,7 @@
 #define SVM_EXIT_AP_JUMP_TABLE          0x80000005ULL
 #define SVM_EXIT_SNP_PAGE_STATE_CHANGE  0x80000010ULL
 #define SVM_EXIT_SNP_AP_CREATION        0x80000013ULL
+#define SVM_EXIT_GET_APIC_IDS           0x80000017ULL
 #define SVM_EXIT_HYPERVISOR_FEATURES    0x8000FFFDULL
 #define SVM_EXIT_UNSUPPORTED            0x8000FFFFULL
 
@@ -170,6 +171,7 @@ typedef union {
 #define GHCB_HV_FEATURES_SNP_AP_CREATE                   (GHCB_HV_FEATURES_SNP 
| BIT1)
 #define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION        
(GHCB_HV_FEATURES_SNP_AP_CREATE | BIT2)
 #define GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION_TIMER  
(GHCB_HV_FEATURES_SNP_RESTRICTED_INJECTION | BIT3)
+#define GHCB_HV_FEATURES_APIC_ID_LIST                    BIT4
 
 //
 // SNP Page State Change.
@@ -203,6 +205,14 @@ typedef struct {
 #define SNP_PAGE_STATE_MAX_ENTRY   \
   ((sizeof (((GHCB *)0)->SharedBuffer) - sizeof (SNP_PAGE_STATE_HEADER)) / 
sizeof (SNP_PAGE_STATE_ENTRY))
 
+//
+// Get APIC IDs
+//
+typedef struct {
+  UINT32    NumEntries;
+  UINT32    ApicIds[];
+} GHCB_APIC_IDS;
+
 //
 // SEV-ES save area mapping structures used for SEV-SNP AP Creation.
 // Only the fields required to be set to a non-zero value are defined.
-- 
2.42.0



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114636): https://edk2.groups.io/g/devel/message/114636
Mute This Topic: https://groups.io/mt/103986461/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to