From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic Date: Thu, 08 Oct 2009 09:39:13 -0500 Message-ID: <4ACDF991.7030202@codemonkey.ws> References: <1254953315-5761-1-git-send-email-glommer@redhat.com> <1254953315-5761-2-git-send-email-glommer@redhat.com> <1254953315-5761-3-git-send-email-glommer@redhat.com> <1254953315-5761-4-git-send-email-glommer@redhat.com> <1254953315-5761-5-git-send-email-glommer@redhat.com> <4ACDEF42.6020706@us.ibm.com> <4ACDF297.9010303@redhat.com> <4ACDF69B.5000000@codemonkey.ws> <4ACDF7DD.1010803@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Glauber Costa , qemu-devel@nongnu.org, kvm-devel To: Avi Kivity Return-path: Received: from fg-out-1718.google.com ([72.14.220.152]:22134 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932293AbZJHOlL (ORCPT ); Thu, 8 Oct 2009 10:41:11 -0400 Received: by fg-out-1718.google.com with SMTP id 22so1305398fge.1 for ; Thu, 08 Oct 2009 07:39:23 -0700 (PDT) In-Reply-To: <4ACDF7DD.1010803@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: >> The problem is, the in-kernel apic is not part of the qemu source >> tree. If we add a field to the qemu apic, then we would break the >> in-kernel apic and vice-versa. It's far easier to just have the >> in-kernel apic as a separate model. >> > > You need to handle it anyway due to save/restore; that is the new > field and whatever functionality it has must be optional. Not necessarily. If it's a bug fix, we may disable the older versions of savevm (which we have to do from time to time). > That doesn't mean they need to be separate devices. But they are. The in-kernel device models are not mere accelerations. There are features that are only enabled with in-kernel device models (like PCI passthrough). In fact, in-kernel PIT is not at all an acceleration, it's there because it's functionally different. The sync stuff is really ugly too. It would be much cleaner to have a separate state for the in-kernel device models that saved the structures from the kernel directly instead of having to translate between formats. More straight forward code means it's all easier to understand, easier to debug, etc. Regards, Anthony Liguori