From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] KVM call minutes for Feb 8 Date: Sun, 13 Feb 2011 09:38:58 -0600 Message-ID: <4D57FB12.5060703@codemonkey.ws> References: <20110208155557.GM6198@x200.localdomain> <4D51B1C9.3080507@codemonkey.ws> <4D526D0D.9020507@codemonkey.ws> <4D52A86A.1030407@codemonkey.ws> <4D52F20A.7070009@codemonkey.ws> <4D539800.3070802@codemonkey.ws> <4D53BE22.3050706@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Blue Swirl , Chris Wright , Markus Armbruster , kvm@vger.kernel.org, qemu-devel@nongnu.org To: Avi Kivity Return-path: Received: from mail-gw0-f46.google.com ([74.125.83.46]:57403 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932Ab1BMPjE (ORCPT ); Sun, 13 Feb 2011 10:39:04 -0500 Received: by gwj20 with SMTP id 20so1724165gwj.19 for ; Sun, 13 Feb 2011 07:39:02 -0800 (PST) In-Reply-To: <4D53BE22.3050706@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/10/2011 04:29 AM, Avi Kivity wrote: > On 02/10/2011 09:47 AM, Anthony Liguori wrote: >> >> So very concretely, I'm suggesting we do the following to target-i386: >> >> 1) make the i440fx device have an embedded ide controller, piix3, and >> usb controller that get initialized automatically. The piix3 embeds >> the PCI-to-ISA bridge along with all of the default ISA devices (rtc, >> serial, etc.). > > This I like. > >> >> 2) get rid of the entire concept of machines. Creating a i440fx is >> essentially equivalent to creating a bare machine. > > No, it's not. The 440fx does not include an IOAPIC, for example. > There may be other optional components, or differences in wiring, that > make two machines with i440fx not identical. The IOAPIC is basically the only other component and I view it as part of the CPU interface to the chipset. But still, if we're creating a machine from scratch: qemu -device i440fx,id=nb -device piix3,id=sb,chipset=nb -device ioapic,id=ioapic,chipset=sb -device cpu,ioapic=ioapic,northbridge=nb Is not all that unreasonable and presents a fully functioning PC. >> >> 4) model the CPUs as devices that take a pointer to a host >> controller, for x86, the normal case would be giving it a pointer to >> i440fx. >> > > Surely the connection is via a bus? An x86 cpu talks to the bus, and > there happens to be an 440fx north bridge at the end of it. It could > also be a Q35 or something else. I see being on a bus as really just taking a pointer to an interface. So yes, the i440fx would implement a PentiumCpuInterface or something like that and the CPU would take a pointer to a PentiumCpuInterface[1]. This is part of why having proper polymorphism is important. We need it in order to be able to express concepts like interfaces. [1] This is just a Random Bad Name. Don't read anything into it. Regards, Anthony Liguori From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56848 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Poe2S-0000aL-UF for qemu-devel@nongnu.org; Sun, 13 Feb 2011 10:39:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Poe2R-0008HC-Lv for qemu-devel@nongnu.org; Sun, 13 Feb 2011 10:39:04 -0500 Received: from mail-gw0-f45.google.com ([74.125.83.45]:34637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Poe2R-0008H3-IH for qemu-devel@nongnu.org; Sun, 13 Feb 2011 10:39:03 -0500 Received: by gwaa12 with SMTP id a12so1904205gwa.4 for ; Sun, 13 Feb 2011 07:39:02 -0800 (PST) Message-ID: <4D57FB12.5060703@codemonkey.ws> Date: Sun, 13 Feb 2011 09:38:58 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] KVM call minutes for Feb 8 References: <20110208155557.GM6198@x200.localdomain> <4D51B1C9.3080507@codemonkey.ws> <4D526D0D.9020507@codemonkey.ws> <4D52A86A.1030407@codemonkey.ws> <4D52F20A.7070009@codemonkey.ws> <4D539800.3070802@codemonkey.ws> <4D53BE22.3050706@redhat.com> In-Reply-To: <4D53BE22.3050706@redhat.com> Content-Type: text/plain; charset=UTF-8; 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: Chris Wright , kvm@vger.kernel.org, qemu-devel@nongnu.org, Markus Armbruster , Blue Swirl On 02/10/2011 04:29 AM, Avi Kivity wrote: > On 02/10/2011 09:47 AM, Anthony Liguori wrote: >> >> So very concretely, I'm suggesting we do the following to target-i386: >> >> 1) make the i440fx device have an embedded ide controller, piix3, and >> usb controller that get initialized automatically. The piix3 embeds >> the PCI-to-ISA bridge along with all of the default ISA devices (rtc, >> serial, etc.). > > This I like. > >> >> 2) get rid of the entire concept of machines. Creating a i440fx is >> essentially equivalent to creating a bare machine. > > No, it's not. The 440fx does not include an IOAPIC, for example. > There may be other optional components, or differences in wiring, that > make two machines with i440fx not identical. The IOAPIC is basically the only other component and I view it as part of the CPU interface to the chipset. But still, if we're creating a machine from scratch: qemu -device i440fx,id=nb -device piix3,id=sb,chipset=nb -device ioapic,id=ioapic,chipset=sb -device cpu,ioapic=ioapic,northbridge=nb Is not all that unreasonable and presents a fully functioning PC. >> >> 4) model the CPUs as devices that take a pointer to a host >> controller, for x86, the normal case would be giving it a pointer to >> i440fx. >> > > Surely the connection is via a bus? An x86 cpu talks to the bus, and > there happens to be an 440fx north bridge at the end of it. It could > also be a Q35 or something else. I see being on a bus as really just taking a pointer to an interface. So yes, the i440fx would implement a PentiumCpuInterface or something like that and the CPU would take a pointer to a PentiumCpuInterface[1]. This is part of why having proper polymorphism is important. We need it in order to be able to express concepts like interfaces. [1] This is just a Random Bad Name. Don't read anything into it. Regards, Anthony Liguori