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.web09.2717.1612385143095013281 for ; Wed, 03 Feb 2021 12:45:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Nc4tYhgh; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612385142; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sX+XvfNuvKIW4uhV/YUzupkIpch1w7aSa9gA+vz1b88=; b=Nc4tYhghg4IlkkFKyTqYcIvucHg5vkKSz3zMrSZfAPOnLaIrytB8n/PD3xGfpQTt8M/JhJ Yb8OkEeRCdy/xnpoGOer1tg1+U27WgV8Fd1FAX8eA6jDKfV0djlzGO1F/kQ46x2K/GmIso eR5T24gC9uyhtxmHL2USJGxO6GvDYSE= 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-363-wuGno3b3NLuPRU_Urld6aA-1; Wed, 03 Feb 2021 15:45:38 -0500 X-MC-Unique: wuGno3b3NLuPRU_Urld6aA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 33F38100A622; Wed, 3 Feb 2021 20:45:37 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-32.ams2.redhat.com [10.36.113.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 802945D9F4; Wed, 3 Feb 2021 20:45:35 +0000 (UTC) Subject: Re: [PATCH v6 9/9] OvmfPkg/SmmControl2Dxe: negotiate CPU hot-unplug To: Ankur Arora , devel@edk2.groups.io Cc: imammedo@redhat.com, boris.ostrovsky@oracle.com, Jordan Justen , Ard Biesheuvel , Aaron Young References: <20210129005950.467638-1-ankur.a.arora@oracle.com> <20210129005950.467638-10-ankur.a.arora@oracle.com> <92a29bb5-fc0e-c11f-2702-07c7729a11b4@redhat.com> <90fcd0ff-8065-9575-c5ec-820176a4e713@oracle.com> From: "Laszlo Ersek" Message-ID: Date: Wed, 3 Feb 2021 21:45:34 +0100 MIME-Version: 1.0 In-Reply-To: <90fcd0ff-8065-9575-c5ec-820176a4e713@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02/03/21 06:46, Ankur Arora wrote: > On 2021-02-01 9:37 a.m., Laszlo Ersek wrote: >> (6) Please drop this hunk. We don't try to be smarter than QEMU, in >> general, whenever we perform feature negotiation. > > Also, AFAICS, we will do the hotplug (and now hot-unplug) even if it wasn't > negotiated? Yes, totally. We don't try to "evict" CpuHotplugSmm in case the related features are not supported/offered by QEMU, we'll just leave CpuHotplugSmm unused. Here's why: the SMI feature negotiation interface is locked down at a certain point; the negotiation of all of the feature bits needs to happen centrally, in a common spot; and it would require a really quirky solution in the firmware to let independent drivers negotiate *subsets* of the features. You have correctly determined that SmmControl2Dxe, the runtime DXE driver that produces EFI_SMM_CONTROL2_PROTOCOL, has nothing much to do with CPU hot-(un)plug. It's just that this is the driver that first used, and therefore now *owns*, the SMI feature negotiation. (See commit 5ba203b54e59 ("OvmfPkg/SmmControl2Dxe: negotiate ICH9_LPC_SMI_F_CPU_HOTPLUG", 2020-08-24).) So, to reformulate your question/statement: the firmware will retain the ability to do hot-(un)plug even if QEMU doesn't contain (or enable) those particular features. Thanks Laszlo