From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48239 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OmNAu-0005dC-S8 for qemu-devel@nongnu.org; Fri, 20 Aug 2010 04:42:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OmNAt-0003bX-TE for qemu-devel@nongnu.org; Fri, 20 Aug 2010 04:42:08 -0400 Received: from mail-vw0-f45.google.com ([209.85.212.45]:64560) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OmNAt-0003bQ-R0 for qemu-devel@nongnu.org; Fri, 20 Aug 2010 04:42:07 -0400 Received: by vws19 with SMTP id 19so2835947vws.4 for ; Fri, 20 Aug 2010 01:42:06 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4C6E3FD9.6080106@redhat.com> Date: Fri, 20 Aug 2010 10:42:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4C6D86F9.3010602@codemonkey.ws> <4C6D98E7.9020109@codemonkey.ws> <4C6DA75D.40303@codemonkey.ws> In-Reply-To: <4C6DA75D.40303@codemonkey.ws> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 0/7] APIC/IOAPIC cleanup List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Blue Swirl , "Liu, Jinsong" , Paul Brook , Avi Kivity , qemu-devel On 08/19/2010 11:51 PM, Anthony Liguori wrote: >>> Neither approach maps well to real hardware. An x86 CPU cannot exist >>> without a local APIC and a local APIC cannot exist without an x86 >>> CPU. The >>> two are fundamentally tied together. >> >> What about 486? Or 82489? > > Don't confuse the local APIC with the PIC or the I/O APIC. > > The local APIC has always existed in the CPU core. There is also an I/O > APIC which exists outside of the CPU core. The local APIC was introduced > with SMP support. In theory it's possible to have a discrete local APIC on the 486 or the Pentium. See figure 5-1 in the Intel multiprocessor specification. > When you look at the local APIC (apic.c) however, you see that it's the > only device in the tree that actually interacts with a CPUState. Even worse, it does it through an opaque pointer even though the only CPUState that makes sense there is the i386 CPUState. (BTW, there is exactly one other example of a CPUState property, and it's in the CRIS PIC). Paolo