From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments Date: Tue, 11 Jan 2011 08:36:42 -0600 Message-ID: <4D2C6AFA.4040104@linux.vnet.ibm.com> References: <4D2616D6.4080309@linux.vnet.ibm.com> <4D26D6CF.5070405@web.de> <4D27A16F.9030809@linux.vnet.ibm.com> <4D282489.90506@web.de> <4D2B6506.6070907@linux.vnet.ibm.com> <4D2B6845.7050809@web.de> <4D2B6ADD.4090505@codemonkey.ws> <4D2C1C5D.2050504@redhat.com> <4D2C6290.1060607@linux.vnet.ibm.com> <1EA102F5-B6C2-43BC-9493-0271B287FC18@suse.de> <4D2C649F.6080508@linux.vnet.ibm.com> <4D2C67C2.5080000@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Graf , Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from e2.ny.us.ibm.com ([32.97.182.142]:60799 "EHLO e2.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756024Ab1AKOhe (ORCPT ); Tue, 11 Jan 2011 09:37:34 -0500 Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p0BEKCKW014367 for ; Tue, 11 Jan 2011 09:20:16 -0500 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 3ADFA4DE8041 for ; Tue, 11 Jan 2011 09:34:32 -0500 (EST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0BEbX1x406248 for ; Tue, 11 Jan 2011 09:37:33 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0BEbWYt013367 for ; Tue, 11 Jan 2011 09:37:33 -0500 In-Reply-To: <4D2C67C2.5080000@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/11/2011 08:22 AM, Avi Kivity wrote: > On 01/11/2011 04:09 PM, Anthony Liguori wrote: >>> Disadvantages: >>> >>> 1) you lose migration / savevm between KVM and non-KVM VMs >> >> This doesn't work today and it's never worked. KVM exposes things >> that TCG cannot emulate (like pvclock). > > If you run kvm without pvclock, or implement pvclock in qemu, it works > fine. It should work fine for the PIT, PIC, and IOAPIC (never tried > it myself). > > If we decide to have a kernel hpet implementation, for example, it > would be good to be able to live migrate from a version without kernel > hpet, to a version with kernel hpet, and have the kernel hpet enabled. > >> >> Even as two devices, nothing prevents it from working. Both devices >> just have to support each other's savevm format. If they use the >> same code, it makes it very easy. Take a look at how the KVM PIT is >> implemented for an example of this. > > They need to use the same device id then. And if they share code, > that indicates that they need to be the same device even more. No, it really doesn't :-) Cirrus VGA and std VGA share a lot of code. But that doesn't mean that we treat them as one device. And BTW, there are guest visible differences between the KVM IOAPIC/PIC/PIT than the QEMU versions. The only reason PIT live migration works today is because usually delivers all interrupts quickly. But it actually does maintain state in the work queue that isn't saved. If PIT tried to implement gradual catchup, there would be no way not to expose that state to userspace. Regards, Anthony Liguori