From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60857 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcfuO-0006Or-2z for qemu-devel@nongnu.org; Tue, 11 Jan 2011 10:13:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcfuM-0002dq-MH for qemu-devel@nongnu.org; Tue, 11 Jan 2011 10:13:16 -0500 Received: from e1.ny.us.ibm.com ([32.97.182.141]:36421) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcfuM-0002dc-Ep for qemu-devel@nongnu.org; Tue, 11 Jan 2011 10:13:14 -0500 Received: from d01dlp02.pok.ibm.com (d01dlp02.pok.ibm.com [9.56.224.85]) by e1.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p0BF4OKj018942 for ; Tue, 11 Jan 2011 10:04:26 -0500 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 7BCB44DE8046 for ; Tue, 11 Jan 2011 10:10:11 -0500 (EST) Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0BFDCQ9278744 for ; Tue, 11 Jan 2011 10:13:12 -0500 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0BFDBoq021904 for ; Tue, 11 Jan 2011 08:13:11 -0700 Message-ID: <4D2C7353.2000008@linux.vnet.ibm.com> Date: Tue, 11 Jan 2011 09:12:19 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 26/35] kvm: Eliminate KVMState arguments 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> <4D2C6AFA.4040104@linux.vnet.ibm.com> <4D2C6FAB.3050209@redhat.com> In-Reply-To: <4D2C6FAB.3050209@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Marcelo Tosatti , Jan Kiszka , Alexander Graf , kvm@vger.kernel.org, qemu-devel@nongnu.org On 01/11/2011 08:56 AM, Avi Kivity wrote: > On 01/11/2011 04:36 PM, Anthony Liguori wrote: >>> 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. > > Cirrus and VGA really are separate devices. They share code because > on evolved from the other, and is backwards compatible with the > other. i8254 and i8254-kvm did not evolve from each other, Actually, they did, but that's besides the point. > both are implementations of the i8254 spec, and both are 100% > compatible with each other (modulu bugs). > >> >> 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. > > Why not? Whatever state the kernel keeps, we expose to userspace and > allow sending it over the wire. What exactly is the scenario you're concerned about? Migration between userspace HPET and in-kernel HPET? One thing I've been considering is essentially migration filters. It would be a set of rules that essentially were "hpet-kvm.* = hpet.*" which would allow migration from hpet to hpet-kvm given a translation of state. I think this sort of higher level ruleset would make it easier to support migration between versions of the device model. Of course, that only gives you a forward path. It doesn't give you a backwards path. Regards, Anthony Liguori