From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxvo1-0006UH-EN for qemu-devel@nongnu.org; Mon, 08 Dec 2014 05:44:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xxvnv-0003uv-8e for qemu-devel@nongnu.org; Mon, 08 Dec 2014 05:44:41 -0500 Received: from [59.151.112.132] (port=31602 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxvnu-0003uo-Sa for qemu-devel@nongnu.org; Mon, 08 Dec 2014 05:44:35 -0500 Message-ID: <54857D61.4030502@cn.fujitsu.com> Date: Mon, 8 Dec 2014 18:28:49 +0800 From: Gu Zheng MIME-Version: 1.0 References: <1409197002-9498-1-git-send-email-guz.fnst@cn.fujitsu.com> <1409197002-9498-11-git-send-email-guz.fnst@cn.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC V2 10/10] cpus: reclaim allocated vCPU objects List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Igor Mammedov , "qemu-devel@nongnu.org" , tangchen@cn.fujitsu.com, isimatu.yasuaki@jp.fujitsu.com, Bharata B Rao , ChenFan , Anshul Makkar , "afaerber@suse.de" Hi Peter, On 12/08/2014 05:26 PM, Peter Maydell wrote: > On 8 December 2014 at 09:16, Bharata B Rao wrote: >> So this approach of parking the vcpu fd in QEMU and reusing it next >> time during CPU hotplug will only work if all architectures supported >> by KVM driver are ok with reuse of vcpu object in the kernel. I am >> using relevant bits of this patch of yours with PowerPC architecture >> to support cpu unplug and I realize that there is at least one case >> where reuse of vcpu object in the kernel causes problems. Before I >> attempt to fix that in ppc KVM, I wanted to check if there is >> consensus on this approach (parking and reusing kvm vcpu fd) in QEMU. > > For ARM we've just clarified the kernel-to-userspace ABI, and > among other things it says you can't reuse the VCPU unless it's > for exactly the same CPU type and feature configuration. So Yes, it's a limitation now, but it is not the final implementation. As to the QEMU side, the vcpu object in kernel is stateless, and a reset operation will be done when we hot add a vcpu, so I think we can kill the limitation, just choose a parked vcpu and reconfigure it before we use it. Thanks, Gu > I'm not sure this park-and-reuse approach will work... > > -- PMM > . >