From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web12.10439.1583325000421574028 for ; Wed, 04 Mar 2020 04:30:00 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bst0KBqc; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583324999; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T84bDsGb31C58hBIY+PK4sVETbavVxOH/VA1pmwyXkY=; b=Bst0KBqcRAjjZe235dmTqKiyIBdcKnfiEIFrRtn4TR2pa38i1lNWYtutiSLCo0X5vUJfsj EtbKJ4qqquN6W906zAXDj72raigAWI/ciaBdMmaIoL9UwGt6t0c71gL9mcHGIhXtX9xHWM 1MoUJqktiNz3EAzL7wihHbtaLsjmVbs= 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-30-_H7NH2MgPlqYSjQjxI0WJg-1; Wed, 04 Mar 2020 07:29:53 -0500 X-MC-Unique: _H7NH2MgPlqYSjQjxI0WJg-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 60AC61137841; Wed, 4 Mar 2020 12:29:50 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-59.ams2.redhat.com [10.36.117.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD44E5C1D6; Wed, 4 Mar 2020 12:29:47 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 00/16] OvmfPkg: support VCPU hotplug with -D SMM_REQUIRE From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Eric Dong , Hao A Wu , Igor Mammedov , Jian J Wang , Jiewen Yao , Jordan Justen , Michael Kinney , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Ray Ni Reply-To: devel@edk2.groups.io, lersek@redhat.com References: <20200226221156.29589-1-lersek@redhat.com> Message-ID: <58071145-b4a3-57bb-85ec-cc53539f22c2@redhat.com> Date: Wed, 4 Mar 2020 13:29:46 +0100 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: <20200226221156.29589-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/26/20 23:11, Laszlo Ersek wrote: > Supersedes: <20200223172537.28464-1-lersek@redhat.com> > Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1512 > Repo: https://github.com/lersek/edk2.git > Branch: vcpu_hotplug_smm_bz_1512_v2 >=20 > V1 was posted at: >=20 > * [edk2-devel] [PATCH 00/16] > OvmfPkg: support VCPU hotplug with -D SMM_REQUIRE >=20 > https://edk2.groups.io/g/devel/message/54734 > http://mid.mail-archive.com/20200223172537.28464-1-lersek@redhat.com >=20 > New in v2: >=20 > - Document (in patch#11) and implement (in patch#12) the "combined" > approach described here: >=20 > http://mid.mail-archive.com/111145fc-be3d-2a9a-a126-c14345a8a8a4@redhat= .com > https://edk2.groups.io/g/devel/message/54754 >=20 > The idea is basically to make the SMM Monarch wait not just until the > hot-added CPU hits the normal RAM Post-SMM Pen (which is safe wrt. > ordering, but can be attacked by the OS), but *also* until the > hot-added CPU is just about to execute RSM first (which is a bit less > safe wrt. ordering, but cannot be attacked by the OS). >=20 > - Pick up Ard's conditional A-b for the other patches, which have not > been modified. >=20 > - Rebase to master, and retest. >=20 > See the Notes sections on the individual patches. >=20 > I wanted to get v2 out on the list before having to ask Intel folks to > do an incremental review. >=20 > Cc: Ard Biesheuvel > Cc: Eric Dong > Cc: Hao A Wu > Cc: Igor Mammedov > Cc: Jian J Wang > Cc: Jiewen Yao > Cc: Jordan Justen > Cc: Michael Kinney > Cc: Philippe Mathieu-Daud=C3=A9 > Cc: Ray Ni >=20 > Thanks, > Laszlo >=20 > Laszlo Ersek (16): > MdeModulePkg/PiSmmCore: log SMM image start failure > UefiCpuPkg/PiSmmCpuDxeSmm: fix S3 Resume for CPU hotplug > OvmfPkg: clone SmmCpuPlatformHookLib from UefiCpuPkg > OvmfPkg: enable SMM Monarch Election in PiSmmCpuDxeSmm > OvmfPkg: enable CPU hotplug support in PiSmmCpuDxeSmm > OvmfPkg/CpuHotplugSmm: introduce skeleton for CPU Hotplug SMM driver > OvmfPkg/CpuHotplugSmm: add hotplug register block helper functions > OvmfPkg/CpuHotplugSmm: define the QEMU_CPUHP_CMD_GET_ARCH_ID macro > OvmfPkg/CpuHotplugSmm: add function for collecting CPUs with events > OvmfPkg/CpuHotplugSmm: collect CPUs with events > OvmfPkg/CpuHotplugSmm: introduce Post-SMM Pen for hot-added CPUs > OvmfPkg/CpuHotplugSmm: introduce First SMI Handler for hot-added CPUs > OvmfPkg/CpuHotplugSmm: complete root MMI handler for CPU hotplug > OvmfPkg: clone CpuS3DataDxe from UefiCpuPkg > OvmfPkg/CpuS3DataDxe: superficial cleanups > OvmfPkg/CpuS3DataDxe: enable S3 resume after CPU hotplug >=20 > MdeModulePkg/Core/PiSmmCore/Dispatcher.c = = | 6 + > OvmfPkg/CpuHotplugSmm/ApicId.h = = | 23 ++ > OvmfPkg/CpuHotplugSmm/CpuHotplug.c = = | 426 ++++++++++++++++++++ > OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf = = | 64 +++ > OvmfPkg/CpuHotplugSmm/FirstSmiHandler.nasm = = | 154 +++++++ > OvmfPkg/CpuHotplugSmm/FirstSmiHandlerContext.h = = | 47 +++ > OvmfPkg/CpuHotplugSmm/PostSmmPen.nasm = = | 151 +++++++ > OvmfPkg/CpuHotplugSmm/QemuCpuhp.c = = | 301 ++++++++++++++ > OvmfPkg/CpuHotplugSmm/QemuCpuhp.h = = | 61 +++ > OvmfPkg/CpuHotplugSmm/Smbase.c = = | 267 ++++++++++++ > OvmfPkg/CpuHotplugSmm/Smbase.h = = | 46 +++ > OvmfPkg/Include/IndustryStandard/Q35MchIch9.h = = | 5 +- > OvmfPkg/Include/IndustryStandard/QemuCpuHotplug.h = = | 3 + > OvmfPkg/OvmfPkgIa32.dsc = = | 7 +- > OvmfPkg/OvmfPkgIa32.fdf = = | 3 +- > OvmfPkg/OvmfPkgIa32X64.dsc = = | 7 +- > OvmfPkg/OvmfPkgIa32X64.fdf = = | 3 +- > OvmfPkg/OvmfPkgX64.dsc = = | 7 +- > OvmfPkg/OvmfPkgX64.fdf = = | 3 +- > UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.c= =3D> OvmfPkg/Library/SmmCpuPlatformHookLibQemu/SmmCpuPlatformHookLibQemu.c= | 45 ++- > UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibNull.i= nf =3D> OvmfPkg/Library/SmmCpuPlatformHookLibQemu/SmmCpuPlatformHookLibQemu= .inf | 24 +- > UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c = = | 14 +- > {UefiCpuPkg =3D> OvmfPkg}/CpuS3DataDxe/CpuS3Data.c = = | 99 +++-- > {UefiCpuPkg =3D> OvmfPkg}/CpuS3DataDxe/CpuS3DataDxe.inf = = | 30 +- > 24 files changed, 1707 insertions(+), 89 deletions(-) > copy UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibN= ull.c =3D> OvmfPkg/Library/SmmCpuPlatformHookLibQemu/SmmCpuPlatformHookLibQ= emu.c (61%) > copy UefiCpuPkg/Library/SmmCpuPlatformHookLibNull/SmmCpuPlatformHookLibN= ull.inf =3D> OvmfPkg/Library/SmmCpuPlatformHookLibQemu/SmmCpuPlatformHookLi= bQemu.inf (43%) > copy {UefiCpuPkg =3D> OvmfPkg}/CpuS3DataDxe/CpuS3Data.c (77%) > copy {UefiCpuPkg =3D> OvmfPkg}/CpuS3DataDxe/CpuS3DataDxe.inf (69%) > create mode 100644 OvmfPkg/CpuHotplugSmm/ApicId.h > create mode 100644 OvmfPkg/CpuHotplugSmm/CpuHotplug.c > create mode 100644 OvmfPkg/CpuHotplugSmm/CpuHotplugSmm.inf > create mode 100644 OvmfPkg/CpuHotplugSmm/FirstSmiHandler.nasm > create mode 100644 OvmfPkg/CpuHotplugSmm/FirstSmiHandlerContext.h > create mode 100644 OvmfPkg/CpuHotplugSmm/PostSmmPen.nasm > create mode 100644 OvmfPkg/CpuHotplugSmm/QemuCpuhp.c > create mode 100644 OvmfPkg/CpuHotplugSmm/QemuCpuhp.h > create mode 100644 OvmfPkg/CpuHotplugSmm/Smbase.c > create mode 100644 OvmfPkg/CpuHotplugSmm/Smbase.h >=20 >=20 > base-commit: edfe16a6d9f8c6830d7ad93ee7616225fe4e9c13 >=20 Merged as commit range 61d3b2d4279e..1158fc8e2c7b, via . Thanks Laszlo