From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.6692.1634201314621903825 for ; Thu, 14 Oct 2021 01:48:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dKeL2hcA; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634201313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=j8B3Oa0CfSrF6nKDIYjhLMlCfvsBsmDV5jaduc84zdM=; b=dKeL2hcAled18Qsa81kx09mln47HqCTtnj32rPMfLK2JfOXkpdRNPzXJyWxADiNn+m5kMo BaEx7jk/BKM3DAMEB4SL53wUy+jo8A0rWo3EQsMMIYv21RPQP7EupmEwZtNdPyUBFQn/cN hVxAne0SMe75Ga7OneWr08afm4/xoMU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-149-PX7ywcNMMxOmXsRkRHokaA-1; Thu, 14 Oct 2021 04:48:28 -0400 X-MC-Unique: PX7ywcNMMxOmXsRkRHokaA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 593DF10A8E05; Thu, 14 Oct 2021 08:48:26 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 16E965C1A3; Thu, 14 Oct 2021 08:48:26 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 225E318007AC; Thu, 14 Oct 2021 10:48:24 +0200 (CEST) Date: Thu, 14 Oct 2021 10:48:24 +0200 From: "Gerd Hoffmann" To: Brijesh Singh Cc: devel@edk2.groups.io, James Bottomley , Min Xu , Jiewen Yao , Tom Lendacky , Jordan Justen , Ard Biesheuvel , Erdem Aktas , Michael Roth , Eric Dong , Ray Ni , Rahul Kumar Subject: Re: [PATCH v9 27/32] UefiCpuPkg/MpInitLib: use BSP to do extended topology check Message-ID: <20211014084824.o4ns5xrhlf3h4ax2@sirius.home.kraxel.org> References: <20211013165713.727815-1-brijesh.singh@amd.com> <20211013165713.727815-28-brijesh.singh@amd.com> MIME-Version: 1.0 In-Reply-To: <20211013165713.727815-28-brijesh.singh@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 13, 2021 at 11:57:08AM -0500, Brijesh Singh wrote: > From: Michael Roth > > During AP bringup, just after switching to long mode, APs will do some > cpuid calls to verify that the extended topology leaf (0xB) is available > so they can fetch their x2 APIC IDs from it. In the case of SEV-ES, > these cpuid instructions must be handled by direct use of the GHCB MSR > protocol to fetch the values from the hypervisor, since a #VC handler > is not yet available due to the AP's stack not being set up yet. > > For SEV-SNP, rather than relying on the GHCB MSR protocol, it is > expected that these values would be obtained from the SEV-SNP CPUID > table instead. The actual x2 APIC ID (and 8-bit APIC IDs) would still > be fetched from hypervisor using the GHCB MSR protocol however, so > introducing support for the SEV-SNP CPUID table in that part of the AP > bring-up code would only be to handle the checks/validation of the > extended topology leaf. > > Rather than introducing all the added complexity needed to handle these > checks via the CPUID table, instead let the BSP do the check in advance, > since it can make use of the #VC handler to avoid the need to scan the > SNP CPUID table directly, and add a flag in ExchangeInfo to communicate > the result of this check to APs. Acked-by: Gerd Hoffmann