From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQGJG-0002Uh-Cb for qemu-devel@nongnu.org; Thu, 21 Jul 2016 11:54:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQGJB-0007tH-9I for qemu-devel@nongnu.org; Thu, 21 Jul 2016 11:54:49 -0400 From: Igor Mammedov Date: Thu, 21 Jul 2016 17:54:31 +0200 Message-Id: <1469116479-233280-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 0/8] Fix migration issues with arbitrary cpu-hot(un)plug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Peter Crosthwaite , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" , David Gibson , Alexander Graf , Riku Voipio , Bharata B Rao , qemu-ppc@nongnu.org Series fixes migration issues caused by unstable cpu_index which depended on order cpus were created/destroyed. It follows David's idea to make cpu_index assignable by selected boards if board supports cpu-hotplug with device_add and needs stable cpu_index/'migration id' but leaves behaviour of the same as before for users that don't care about cpu-hot(un)plug making changes low-risk. tested with: SRC -snapshot -enable-kvm -smp 1,maxcpus=3 -m 256M guest.img -monitor stdio \ -device qemu64-x86_64-cpu,id=cpudel,apic-id=1 \ -device qemu64-x86_64-cpu,apic-id=2 (qemu) device_del cpudel (qemu) stop (qemu) migrate "exec:gzip -c > STATEFILE.gz" DST -snapshot -enable-kvm -smp 1,maxcpus=3 -m 256M guest.img -monitor stdio \ -device qemu64-x86_64-cpu,apic-id=2 \ -incoming "exec: gzip -c -d STATEFILE.gz" git tree to test with: https://github.com/imammedo/qemu cpu-index-stable to view https://github.com/imammedo/qemu/commits/cpu-index-stable CC: Paolo Bonzini CC: Peter Crosthwaite CC: Richard Henderson CC: Eduardo Habkost CC: "Michael S. Tsirkin" CC: David Gibson CC: Alexander Graf CC: Riku Voipio CC: Bharata B Rao CC: qemu-ppc@nongnu.org David Gibson (1): Revert "spapr: Ensure CPU cores are added contiguously and removed in LIFO order" Igor Mammedov (7): exec: reduce CONFIG_USER_ONLY ifdeffenery exec: don't use cpu_index to detect if cpu_exec_init()'s been called for cpu exec: set cpu_index only if it's been explictly set qdev: fix object reference leak in case device.realize() fails pc: init CPUState->cpu_index with index in possible_cpus[] spapr: init CPUState->cpu_index with index relative to core-id Revert "pc: Enforce adding CPUs contiguously and removing them in opposite order" bsd-user/qemu.h | 2 -- include/exec/exec-all.h | 12 +++++++++ include/qemu/queue.h | 2 ++ include/qom/cpu.h | 2 ++ linux-user/qemu.h | 2 -- exec.c | 65 +++++++++---------------------------------------- hw/core/qdev.c | 8 +++++- hw/i386/pc.c | 38 +++-------------------------- hw/ppc/spapr_cpu_core.c | 25 ++++--------------- qom/cpu.c | 2 +- 10 files changed, 44 insertions(+), 114 deletions(-) -- 2.7.4