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.web11.9033.1601546390959599973 for ; Thu, 01 Oct 2020 02:59:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HC2KUWTy; 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=1601546390; 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=BD0Ztc6NDHuN4PjlwPRnPNlB+MV2y1Nxc1mi0GLHOwg=; b=HC2KUWTyqnCQDYS3Ch/hySA+oozC07K6ZC/cch2rs3tCqcochLk1D6kfiPRMp+ilj5CNEY VEeib7+E0xXRibVznn8JkIi970yVnWd39KdPqNMhRFUMi/dYsSlzp0RqLX8E4n/BAJ8i1a hETbMEaLsic42TaSPGyT3st163hl/NQ= 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-586-ZKDlNB8WOS2jXnZXplTjDw-1; Thu, 01 Oct 2020 05:59:46 -0400 X-MC-Unique: ZKDlNB8WOS2jXnZXplTjDw-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 3C88E186DD2A; Thu, 1 Oct 2020 09:59:45 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-110.ams2.redhat.com [10.36.113.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id D45267369B; Thu, 1 Oct 2020 09:59:43 +0000 (UTC) Subject: [ann] OvmfPkg: support VCPU hotplug with -D SMM_REQUIRE To: devel@edk2.groups.io, jiaxin.wu@intel.com References: <20200223172537.28464-1-lersek@redhat.com> <2679d4af-4034-525e-8189-2d795794ced1@redhat.com> From: "Laszlo Ersek" Cc: aaron.young@oracle.com, Boris Ostrovsky , Igor Mammedov Message-ID: <162138ff-e88a-a1c6-0b81-c6d91b1a955e@redhat.com> Date: Thu, 1 Oct 2020 11:59:42 +0200 MIME-Version: 1.0 In-Reply-To: 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 Hello Jiaxin, On 07/29/20 10:37, Wu, Jiaxin wrote: > Hi Laszlo, > > Appreciate your feedback! Thank you very much. if you are still interested in using this feature, I have some good news. As of current edk2 master (to be entirely precise: as of edk2 commit cbccf995920a), and as of upstream QEMU commit 6e2e2e8a4220, the "VCPU hotplug with SMM" feature is considered complete. Both the singular "virsh setvcpu" command (which gives you precise NUMA affinity for the VCPU being hot-plugged), and the plural "virsh setvcpus" command, are expected to work. (For plugging.) I'm repeating a short summary here about the necessary configuration on your end: * install a Linux guest as described in my Wiki article: https://github.com/tianocore/tianocore.github.io/wiki/Testing-SMM-with-QEMU,-KVM-and-libvirt * modify the domain XML for the guest:, - replace the "pc-q35-2.9" machine type with "pc-q35-5.2" - replace the following stanza: 4 with: 4 * With Linux guests, you may have to online the just-plugged VCPUs in the guest as a separate step (dependent on your guest Linux distribution). For this, you can either use (in the guest) commands like echo 1 > /sys/devices/system/cpu/cpu2/online echo 1 > /sys/devices/system/cpu/cpu3/online (note that the numbering is in order of the Linux guest learning of the processor). Alternatively, in case you used the plural "virsh setvcpus" command, *and* you have the guest agent running in your guest, you can follow up with virsh setvcpus ... --guest on the host side (the "--guest" option being the important one). This will ask the QEMU guest agent to perform the same onlining as the explicit "echo" commands above. * Windows guests do not need separate onlining of the hot-added CPUs. The oldest Windows release that (to my knowledge) supports CPU hotplug is Windows Server 2008 R2 *Datacenter* edition. Thanks Laszlo