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.web08.10595.1607592124210003307 for ; Thu, 10 Dec 2020 01:22:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WXF70ekB; 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=1607592123; 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=fd3CpiwJ3dWHG35RWRvm9AaTcgAL+y13HD7v+oPRguc=; b=WXF70ekBjU7O573ILqDPTbMa6PABJwc9wb9WOGcGxEOiDQRopjiNyfWJ6XOSp/HhEMME2+ /wuNB9hMuDwr4hxfU7KYQNPKgEIu645gBNYobIUSx2yKSqikPNci01IuoirFkiCROWV6fq SrXYxz83cgnt/SaTZ2/7VfD/58IJAJE= 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-7-t0awk-owPsGjocsTlVhlzg-1; Thu, 10 Dec 2020 04:21:58 -0500 X-MC-Unique: t0awk-owPsGjocsTlVhlzg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 081C0858182; Thu, 10 Dec 2020 09:21:57 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-52.ams2.redhat.com [10.36.113.52]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA606620D7; Thu, 10 Dec 2020 09:21:55 +0000 (UTC) Subject: Re: [RFC PATCH 0/5] support CPU hot-unplug To: Ankur Arora , devel@edk2.groups.io Cc: imammedo@redhat.com, boris.ostrovsky@oracle.com References: <20201208053432.2690694-1-ankur.a.arora@oracle.com> From: "Laszlo Ersek" Message-ID: <58d0ab9c-d50e-125f-d439-70a409bf95f0@redhat.com> Date: Thu, 10 Dec 2020 10:21:54 +0100 MIME-Version: 1.0 In-Reply-To: <20201208053432.2690694-1-ankur.a.arora@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 Hi Ankur, On 12/08/20 06:34, Ankur Arora wrote: > [ Resending to the correct edk2 alias this time. ] > > Hi, > > This series adds support for CPU hot-unplug with OVMF. > > Please see this in conjunction with the QEMU v2 series posted here: > https://lore.kernel.org/qemu-devel/20201207140739.3829993-1-imammedo@redhat.com/ > > In particular, would be glad for comments on Patch 4, specifically > where we should be ejecting the CPU. > > Right now the ejection happens in UnplugCpus() (called from > CpuHotplugMmi()): > + QemuCpuhpWriteCpuSelector (mMmCpuIo, RemoveApicId); > + QemuCpuhpWriteCpuStatus (mMmCpuIo, QEMU_CPUHP_STAT_EJECTED); > > That is way too early -- given that the actual unplug will happen > in SmmCpuUpdate() and given that the BSPHandler() would have waited > for the APs multiple times before then. > > Another possibility is that the actual ejection be deferred to the > _EJ0 method after the return from the SMI. But, that seems like a > hack. Additionally, Igor points out here that this approach has problems: > https://lore.kernel.org/qemu-devel/20201204170939.1815522-1-imammedo@redhat.com/ > > Please review. thanks for the patches; I'm confirming I've got them. I'll need a non-trivial amount of time before I come to these patches (and to the QEMU patches posted by Igor). I'm working very busily on and my brain is full of other stuff. We had the reverse situation earlier this year, I think, when -- in relation to hotplug -- Igor was occupied with a more pressing QEMU development (NUMA I think?), for a significant amount of time. What's important is that I want to do both Igor's patches and your patches *justice*, with my review, and at this time I just cannot sit down with them alone for a day. These patches deserve a deep looking-at, rather than a skim, and I cannot afford the former at the moment. I prefer doing a (hopefully) thorough review, later, to rushing a review now. I hope that's tolerable. Thank you, Laszlo