From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXTzj-0002PZ-Fb for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:56:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXTze-0007ph-A5 for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:56:30 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:36627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXTzd-0007pZ-Sx for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:56:26 -0400 Received: by mail-wm0-x235.google.com with SMTP id q128so95461041wma.1 for ; Wed, 10 Aug 2016 06:56:25 -0700 (PDT) Date: Wed, 10 Aug 2016 15:56:24 +0200 From: Eduardo Otubo Message-ID: <20160810135624.GA31198@vader> References: <1468515285-173356-1-git-send-email-imammedo@redhat.com> <20160719005027-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <20160719005027-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 00/16] pc: add CPU hot-add/hot-remove with device_add/device_del List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Igor Mammedov , qemu-devel@nongnu.org, pkrempa@redhat.com, ehabkost@redhat.com, Bandan Das --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 19, 2016 at 12=3D59=3D36AM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 14, 2016 at 06:54:29PM +0200, Igor Mammedov wrote: > > Changelog: >=20 > So for pc and apic bits: >=20 > Reviewed-by: Michael S. Tsirkin >=20 > Since Eduardo picked up first part of this, feel free > to merge the rest too. Hi Igor, I was a little curios about the state of this feature. Is this going to make it to 2.7? Best regards, >=20 >=20 >=20 > > since v3: > > * rebase on top of x86-next tree as it's already applied 1-6/19 fro= m v3 > > (so they are could be omitted from v4) > > * set apic-state to NULL after destroying it in unrealize() > > * fix places where I forgot to print X86CPUTopoInfo fields as %u > > * move "pc: implement query-hotpluggable-cpus callback" after > > patch that enables device_add cpu > > * extract counting of present cpus in possible_cpus into a separate= helper > > * newly added patches: > > * pc: forbid BSP removal > > * pc: enforce adding CPUs contiguously and removing them in opp= osit order > > * apic: kvm-apic: fix crash due to access to freed memory region > > * update Reviewed-bys > > since v2: > > * use 0xFFFFFFFF for UNASSIGNED_APIC_ID instead of UINT32_MAX > > * add comment why 0xFFFFFFFF could be used for UNASSIGNED_APIC_ID > > * print topo ids is unsigned > > * print APIC ID as hex > > * print topo ids calculated from APIC ID beside it > > * add extra patch to fix migration failure due to APIC's instance_i= d mismatch > > since v1: > > * s/pc_find_cpu/pc_find_cpu_slot/ + add comment to it > > * add more sanity checks for socket-id/core-id/thread-id and 'apic' > > properties > > * include device_del cpu patches and related fixes to x86 CPU/apic > >=20 > > Series enabling usage of -device/device_add for adding CPUs as devices > > and device_del for removing them. Using -device/device_add in combinati= on > > with query-hotpluggable-cpus QMP command allows to hotplug CPUs at any > > not used possition and then safely migrate QEMU instance by specifying > > hotadded CPUs on target with help of -device CLI option like with any > > other device. > > Having been able to replicate exact topology on taggert with -device CP= Us > > also opens poosibility to hot-remove CPUs, which this series does by > > enabling to use device_del with x86 CPUs. > >=20 > >=20 > > git tree for testing: > > https://github.com/imammedo/qemu.git dev_del_cpu_v4 > > for viewing: > > https://github.com/imammedo/qemu/commits/dev_del_cpu_v4 > >=20 > > Tested with RHEL7.2 guest including ping/pong migration with adding/rem= oving > > CPUs in between. > >=20 > > CC: pkrempa@redhat.com > > CC: ehabkost@redhat.com > > CC: mst@redhat.com > > CC: eduardo.otubo@profitbricks.com > > CC: Bandan Das > >=20 > > Igor Mammedov (16): > > pc: set APIC ID based on socket/core/thread ids if it's not been set > > yet > > pc: delay setting number of boot CPUs to machine_done time > > pc: register created initial and hotpluged CPUs in one place > > pc_cpu_plug() > > pc: forbid BSP removal > > pc: enforce adding CPUs contiguously and removing them in opposit > > order > > pc: cpu: allow device_add to be used with x86 cpu > > pc: implement query-hotpluggable-cpus callback > > apic: move MAX_APICS check to 'apic' class > > apic: drop APICCommonState.idx and use APIC ID as index in > > local_apics[] > > apic: kvm-apic: fix crash due to access to freed memory region > > (kvm)apic: add unrealize callbacks > > apic: use apic_id as apic's migration instance_id > > target-i386: cpu: do not ignore error and fix apic parent > > target-i386: fix apic object leak when CPU is deleted > > target-i386: add x86_cpu_unrealizefn() > > pc: make device_del CPU work for x86 CPUs > >=20 > > include/hw/i386/apic_internal.h | 5 +- > > include/hw/i386/pc.h | 5 ++ > > hw/i386/kvm/apic.c | 9 +- > > hw/i386/pc.c | 183 ++++++++++++++++++++++++++++++++= ++------ > > hw/intc/apic.c | 26 +++++- > > hw/intc/apic_common.c | 33 ++++++-- > > qmp-commands.hx | 15 ++++ > > target-i386/cpu.c | 23 ++++- > > 8 files changed, 251 insertions(+), 48 deletions(-) > >=20 > > --=20 > > 2.7.4 --=20 Eduardo Otubo ProfitBricks GmbH --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXqzKIAAoJEP0M/1sS+L0vBcAIAJCV5MXuHOn6OHGaukf33P1t ljdTva7cPQIs73gEsvBKmtfXM5WK63rAVt0U30H/JmSG1XasmIxXuEBbAOMMWJa2 ll9XG1YOLihAe6sSCjGo64EXLQM4OrinoNnueohk4q6SoOxxJX0dggNNLXscqdKe eJPhldWSCeySJyaEjIXoHisICdlpkNjBYMI7dMPec92UVXZP2bP/2aKiMYKe3H9/ hcaKORnr/VLiLN3F5T4md4PBRzP6afNiewxLlza+/dqcgnHEfJq1toi6DP4ZTpgU fi/tcQbCqaXCBuf0U1UIb3idptBNF91VmpieZzNnHup9Oa55N29UcqBpmXqp+00= =Y3+b -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT--