From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.groups.io with SMTP id smtpd.web10.2870.1611973436351917092 for ; Fri, 29 Jan 2021 18:23:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LkXAv5VT; spf=pass (domain: redhat.com, ip: 63.128.21.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611973435; 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=2sSmMnnfnOfGAL4ZxBl3hF3LwaRJ0yVz4TR47BJQmUQ=; b=LkXAv5VTYFiWujDnxlQYlFUms4y1kjTdtCRrX+ThSk3jN+G4QBKSEe5tPb81ovOMxQQh3a Lu1Dd+VL7bBuimzwKYV4rWZO4znTINYNs4In7Oge0YXUrm8dCOa/9gIPaT19EjXUldtjKO DRCP5BK4wbA/JYPCo5TnLgtzVOh9JHc= 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-258-Vh27nh-BOoy84bReWBve0A-1; Fri, 29 Jan 2021 21:23:51 -0500 X-MC-Unique: Vh27nh-BOoy84bReWBve0A-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D6CB802B40; Sat, 30 Jan 2021 02:23:50 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-14.ams2.redhat.com [10.36.112.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9340D60622; Sat, 30 Jan 2021 02:23:48 +0000 (UTC) Subject: Re: [PATCH v6 2/9] OvmfPkg/CpuHotplugSmm: collect hot-unplug events From: "Laszlo Ersek" 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-3-ankur.a.arora@oracle.com> <8eb3d0e1-f303-9e29-a6bd-534523e32545@redhat.com> Message-ID: Date: Sat, 30 Jan 2021 03:23:47 +0100 MIME-Version: 1.0 In-Reply-To: <8eb3d0e1-f303-9e29-a6bd-534523e32545@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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 01/30/21 03:18, Laszlo Ersek wrote: > On 01/29/21 01:59, Ankur Arora wrote: >> Process fw_remove events in QemuCpuhpCollectApicIds() and collect >> corresponding APIC IDs for CPUs that are being hot-unplugged. >> >> In addition, we now ignore CPUs which only have remove set. These >> CPUs haven't been processed by OSPM yet. >> >> This is based on the QEMU hot-unplug protocol documented here: >> https://lore.kernel.org/qemu-devel/20201204170939.1815522-3-imammedo@redhat.com/ >> >> Also define QEMU_CPUHP_STAT_EJECTED while we are at it. > > (1) Please move the addition of QEMU_CPUHP_STAT_EJECTED to patch 8 > ("OvmfPkg/CpuHotplugSmm: add worker to do CPU ejection"), where you > first use it. (4) Apologies for the bikeshedding, but I also suggest that we call the macro "QEMU_CPUHP_STAT_EJECT", rather than "_EJECTED". Reason: QEMU documents this bit (on write) as "initiates device eject"; in other words, it's not a status, but a signal (or request) from the guest code to QEMU. Thanks Laszlo