From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTlda-0003Sc-Je for qemu-devel@nongnu.org; Thu, 24 Nov 2011 21:35:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTldZ-0007DQ-MJ for qemu-devel@nongnu.org; Thu, 24 Nov 2011 21:35:38 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:39535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTldZ-0007DM-H1 for qemu-devel@nongnu.org; Thu, 24 Nov 2011 21:35:37 -0500 Received: by iakk32 with SMTP id k32so4328882iak.4 for ; Thu, 24 Nov 2011 18:35:36 -0800 (PST) From: Liu Ping Fan Date: Fri, 25 Nov 2011 10:35:21 +0800 Message-Id: <1322188529-11609-1-git-send-email-kernelfans@gmail.com> Subject: [Qemu-devel] [PATCH 0] A series patches for kvm&qemu to enable vcpu destruction in kvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, ryanh@us.ibm.com, jan.kiszka@web.de, linux-kernel@vger.kernel.org, avi@redhat.com A series of patches from kvm, qemu to guest. These patches will finally enable vcpu destruction in kvm instance and let vcpu thread exit in qemu. Currently, the vcpu online feature enables the dynamical creation of vcpu and vcpu thread, while the offline feature can not destruct the vcpu and let vcpu thread exit, it just halt in kvm. Because currently, the vcpu will only be destructed when kvm instance is destroyed. We can change vcpu as an refer of kvm instance, and then vcpu's destruction MUST and CAN come before kvm's destruction. These patches use guest driver to notify the CPU_DEAD event to qemu, and later qemu asks kvm to release the dead vcpu and finally exit the thread. The usage is: qemu$cpu_set n online qemu$cpu_set n zap ------------ This will destroy the vcpu-n in kvm and let vcpu thread exit OR qemu$cpu_set n offline --------- This will just block vcpu-n in kvm Any comment and suggestion are welcome. Patches include: |-- guest | `-- 0001-virtio-add-a-pci-driver-to-notify-host-the-CPU_DEAD-.patch |-- kvm | |-- 0001-kvm-make-vcpu-life-cycle-separated-from-kvm-instance.patch | `-- 0002-kvm-exit-to-userspace-with-reason-KVM_EXIT_VCPU_DEAD.patch `-- qemu |-- 0001-Add-cpu_phyid_to_cpu-to-map-cpu-phyid-to-CPUState.patch |-- 0002-Add-cpu_free-to-support-arch-related-CPUState-releas.patch |-- 0003-Introduce-a-pci-device-cpustate-to-get-CPU_DEAD-even.patch |-- 0004-Release-vcpu-and-finally-exit-vcpu-thread-safely.patch `-- 0005-tmp-patches-for-linux-header-files.patch