From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51108 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcenF-0000EB-PD for qemu-devel@nongnu.org; Tue, 11 Jan 2011 09:01:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcenD-0007wP-RO for qemu-devel@nongnu.org; Tue, 11 Jan 2011 09:01:49 -0500 Received: from e33.co.us.ibm.com ([32.97.110.151]:53705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcenD-0007vv-L6 for qemu-devel@nongnu.org; Tue, 11 Jan 2011 09:01:47 -0500 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e33.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p0BDte8N008852 for ; Tue, 11 Jan 2011 06:55:40 -0700 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0BE1eaG102888 for ; Tue, 11 Jan 2011 07:01:40 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0BE1d2S008842 for ; Tue, 11 Jan 2011 07:01:39 -0700 Message-ID: <4D2C6290.1060607@linux.vnet.ibm.com> Date: Tue, 11 Jan 2011 08:00:48 -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> In-Reply-To: <4D2C1C5D.2050504@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 , qemu-devel@nongnu.org, kvm@vger.kernel.org, Alexander Graf On 01/11/2011 03:01 AM, Avi Kivity wrote: > On 01/10/2011 10:23 PM, Anthony Liguori wrote: >>>> I don't see how ioapic, pit, or pic have a system scope. >>> They are not bound to any CPU like the APIC which you may have in mind. >> >> And none of the above interact with KVM. > > They're implemented by kvm. What deeper interaction do you have in mind? The emulated ioapic/pit/pic do not interact with KVM at all. The KVM versions should be completely separate devices. > >> >> They may be replaced by KVM but if you look at the PIT, this is done >> by having two distinct devices. The KVM specific device can (and >> should) be instantiated with kvm_state. >> >> The way the IOAPIC/APIC/PIC is handled in qemu-kvm is nasty. The >> kernel devices are separate devices and that should be reflected in >> the device tree. > > I don't see why. Those are just two different implementations for the > same guest visible device. Right, they should appear the same to the guest but the fact that they're two different implementations should be reflected in the device tree. > It's like saying IDE should be seen differently if it's backed by > qcow2 or qed. No, it's not at all. Advantages of separating KVM devices: 1) it becomes very clear what functionality is handled in the kernel verses in userspace (you can actually look at the code and tell) 2) a user can explicitly create either the emulated version of the device or the in-kernel version of the device (no need for -no-kvm-irqchip) 3) a user can pass parameters directly to the in-kernel version of the device that are different from the userspace version (like selecting different interrupt catch-up methods) Regards, Anthony Liguori > The device tree is about the guest view of devices. >