From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.groups.io with SMTP id smtpd.web12.354.1570566452239044418 for ; Tue, 08 Oct 2019 13:27:32 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C6A043024562; Tue, 8 Oct 2019 20:27:31 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-109.rdu2.redhat.com [10.10.120.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id D764A6092F; Tue, 8 Oct 2019 20:27:29 +0000 (UTC) Subject: Re: [PATCH 0/4] UefiCpuPkg, OvmfPkg: separate PCDs for boot CPU count vs. max CPU count To: Ard Biesheuvel Cc: edk2-devel-groups-io , Anthony Perard , Eric Dong , Igor Mammedov , Jordan Justen , Julien Grall , Ray Ni References: <20191008112714.6215-1-lersek@redhat.com> From: "Laszlo Ersek" Message-ID: <570efc5d-5d57-bf76-0b7a-628697a58804@redhat.com> Date: Tue, 8 Oct 2019 22:27:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 08 Oct 2019 20:27:31 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/08/19 13:35, Ard Biesheuvel wrote: > On Tue, 8 Oct 2019 at 13:27, Laszlo Ersek wrote: >> >> Repo: https://github.com/lersek/edk2.git >> Branch: max_cpus_bz_1515 >> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1515 >> >> UefiCpuPkg/MpInitLib currently lacks support for the following use case: >> >> - time-limited AP enumeration is not reliable on the platform >> (individual AP check-in may take arbitrarily long), and >> >> - APs may finish the wakeup routine, and report in to the BSP, in any >> sequence whatsoever, and >> >> - the number of boot CPUs (which is known in advance) is strictly less >> than the number of maximum CPUs (which is also known in advance). >> >> In the above case, the platform cannot tell UefiCpuPkg/MpInitLib to wait >> exactly until all boot APs check in. That is, the platform can't request >> that the AP enumeration never time out, but also not wait for too long. >> >> For supporting this use case, the patch series introduces >> PcdCpuBootLogicalProcessorNumber to UefiCpuPkg, and makes MpInitLib wait >> for exactly that many CPUs (= BSP + APs) to show up during CPU >> enumeration. >> >> Working towards VCPU hotplug with OVMF, OvmfPkg/PlatformPei fetches both >> the boot and the max CPU counts from QEMU, co-operating with the >> following QEMU patch set: >> >> [qemu-devel] [PATCH 0/4] hw/i386: pass "MachineState.smp.max_cpus" to OVMF >> http://mid.mail-archive.com/20191008105259.5378-1-lersek@redhat.com >> >> and passes them to UefiCpuPkg via PcdCpuBootLogicalProcessorNumber and >> PcdCpuMaxLogicalProcessorNumber. >> >> As a result, PcdCpuApInitTimeOutInMicroSeconds becomes irrelevant for, >> and unused by, OVMF -- time-limited AP enumeration is never going to be >> used. >> >> When OVMF is built with -D SMM_REQUIRE, this patch series is just a >> small building block, towards the full VCPU hotplug feature. However, >> when OVMF is built without -D SMM_REQUIRE, this series (together with >> the counterpart patch set for QEMU) completes the VCPU hotplug feature: >> it allows S3 resume to work with VCPUs hot-plugged previously (at OS >> runtime, of course). >> >> Cc: Anthony Perard >> Cc: Ard Biesheuvel >> Cc: Eric Dong >> Cc: Igor Mammedov >> Cc: Jordan Justen >> Cc: Julien Grall >> Cc: Ray Ni >> >> Thanks >> Laszlo >> >> Laszlo Ersek (4): >> UefiCpuPkg/MpInitLib: honor the platform's boot CPU count in AP >> detection > > Assuming this ^^^ patch gets accepted by the maintainers, > >> OvmfPkg/OvmfXen.dsc: remove PcdCpu* dynamic defaults >> OvmfPkg/IndustryStandard: define FW_CFG_X86_TOPOLOGY structure type >> OvmfPkg/PlatformPei: rewrite MaxCpuCountInitialization() for CPU >> hotplug >> > > Acked-by: Ard Biesheuvel > > for the OvmfPkg changes. > Thanks! Laszlo