From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57488 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OnHEX-0002TK-BN for qemu-devel@nongnu.org; Sun, 22 Aug 2010 16:33:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OnHES-0001Nh-Nk for qemu-devel@nongnu.org; Sun, 22 Aug 2010 16:33:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45907) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OnHES-0001Nb-FG for qemu-devel@nongnu.org; Sun, 22 Aug 2010 16:33:32 -0400 Message-ID: <4C71898E.9090105@redhat.com> Date: Sun, 22 Aug 2010 23:33:18 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 0/7] APIC/IOAPIC cleanup References: <4C6D86F9.3010602@codemonkey.ws> <4C6D98E7.9020109@codemonkey.ws> <4C70EFC9.2050404@redhat.com> <4C7171EB.7090301@codemonkey.ws> <4C717E05.50609@redhat.com> <4C718296.8030405@codemonkey.ws> In-Reply-To: <4C718296.8030405@codemonkey.ws> 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: Anthony Liguori Cc: Blue Swirl , "Liu >> \"Liu, Jinsong\"" , qemu-devel , Paul Brook On 08/22/2010 11:03 PM, Anthony Liguori wrote: > On 08/22/2010 02:44 PM, Avi Kivity wrote: >>> No more MI diamond and all devices have DeviceStates. >>> Coincidentally, it matches more closely how hardware works.. >>> >> >> >> Well, I agree, but I honestly lost the context. How does this relate >> to the APIC and cpu hotplug? > > My original assertion was that the local APIC is not a DeviceState, > but rather it's a CPU feature. > > If you look at some of the magic that apic.c has to do in the IO > callbacks, it should be clear that it's special. It's special in that it is connected to a cpu core. So's the RTL8139 device, on one hand connected to a PCI bus, on the other hand connected to a PHY (netdev in qemu). > In the not too distant future, I'd like to move apic.c to > target-i386. There should be no need to explicitly instantiate it > when you instantiate a CPU. But then there's a need explicitly not to instantiate it when using -isapc. > > BTW, this gets a bit funky with KVM. If we declare that the lapic is > part of the CPU, then in an ideal world we would have interfaces for > the I/O APIC as part of the KVM interface so we could implement the > I/O APIC in userspace with the lapic implemented in the kernel. We discussed that once (or rather, twice), but the conclusion was it was too much work for the gain, especially as we'd have to keep supporting the old interface forever. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.