From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2BF23D80A13 for ; Mon, 29 Jan 2024 14:52:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=1jGiWtl/Uspnlo39BlhFfDHHIZX/389nIbaE6UXKT1E=; c=relaxed/simple; d=groups.io; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Disposition; s=20140610; t=1706539936; v=1; b=B25G5wJuiJAgIQWJHmqYNN0CXX8l0REdx1WUVZNY3y7Yb/WiOe8bkeoCE9tMvXDPW2Pp7nWY IkLqjnIctKouYrMFfWHWkgAES4n2b2WIMCtLCGBxIqhm2fKYIjTb2rw3yqbvI3ixkB/BKuBbc6Z 8bvHuQs6m3HRlr0KczQfZPUo= X-Received: by 127.0.0.2 with SMTP id F8o0YY7687511xEqirLyWpKn; Mon, 29 Jan 2024 06:52:16 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.16953.1706539936106103156 for ; Mon, 29 Jan 2024 06:52:16 -0800 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-151-Iuy_geCmMqGIzFaTRBLIxA-1; Mon, 29 Jan 2024 09:52:11 -0500 X-MC-Unique: Iuy_geCmMqGIzFaTRBLIxA-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C2DB88493ED; Mon, 29 Jan 2024 14:52:10 +0000 (UTC) X-Received: from sirius.home.kraxel.org (unknown [10.39.192.180]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C3462026D66; Mon, 29 Jan 2024 14:52:10 +0000 (UTC) X-Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id F39DF180038B; Mon, 29 Jan 2024 15:52:08 +0100 (CET) Date: Mon, 29 Jan 2024 15:52:08 +0100 From: "Gerd Hoffmann" To: Tom Lendacky Cc: devel@edk2.groups.io, Ard Biesheuvel , Erdem Aktas , Jiewen Yao , Laszlo Ersek , Liming Gao , Michael D Kinney , Min Xu , Zhiguang Liu , Rahul Kumar , Ray Ni , Michael Roth Subject: Re: [edk2-devel] [PATCH 10/16] MdePkg: GHCB APIC ID retrieval support definitions Message-ID: References: <163f1b66d4c516c81270506391cef77ba7b1c546.1706307195.git.thomas.lendacky@amd.com> MIME-Version: 1.0 In-Reply-To: <163f1b66d4c516c81270506391cef77ba7b1c546.1706307195.git.thomas.lendacky@amd.com> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,kraxel@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: X6qDv00ZMq48X1ndcY3gTtOQx7686176AA= Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=B25G5wJu; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none) On Fri, Jan 26, 2024 at 04:13:09PM -0600, Tom Lendacky wrote: > 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 > --- > 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; So with GHCB being one page in size this interface can handle at most 1023 vCPUs, right? Any plans to handle guest larger than that? Given this just adds the interface defined by the spec so this is a concern for the spec not the patch: Acked-by: Gerd Hoffmann take care, Gerd -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#114708): https://edk2.groups.io/g/devel/message/114708 Mute This Topic: https://groups.io/mt/103986461/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-