Received: from eggs.gnu.org ([2001:4830:134:3::10]:46816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wvf1p-0003Ic-4K for qemu-devel@nongnu.org; Fri, 13 Jun 2014 23:53:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wvf1k-0005T8-9P for qemu-devel@nongnu.org; Fri, 13 Jun 2014 23:53:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wvf1k-0005Px-14 for qemu-devel@nongnu.org; Fri, 13 Jun 2014 23:53:12 -0400 Date: Sat, 14 Jun 2014 00:53:06 -0300 From: Eduardo Habkost Message-ID: <20140614035306.GF3306@otherpad.lan.raisama.net> References: <1402688658-22333-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1402688658-22333-1-git-send-email-ehabkost@redhat.com> Subject: Re: [Qemu-devel] [RFC v2 00/39] Convert PC machine-types to QOM classes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, "Michael S. Tsirkin" Cc: Marcel Apfelbaum , Alexander Graf , Don Slutz , Anthony Liguori , Igor Mammedov , Andreas =?iso-8859-1?Q?F=E4rber?= On Fri, Jun 13, 2014 at 04:43:39PM -0300, Eduardo Habkost wrote: > Now with lots of cleanup, so you can see how the end result will look like after > the conversion. > > My goal is that _all_ PC machine-types should be declared using only a > class_init + TypeInfo pair, and nothing else. The only thing I couldn't > eliminate yet were the pc_compat_*() functions, because we still need them for > the KVM CPUID compat stuff. Git tree: https://github.com/ehabkost/qemu-hacks/tree/pc-machine-class.v2 This is based on Michael's pci tree. The basic steps of the conversion (which I forgot to include in the cover letter): * PC_COMPAT_* cleanup, so all follow the same nesting pattern * Make MachineClass.compat_props a linked list * Mechanical conversion of current code to QOM (like the previous RFC I sent) * Elimination of *machine_options() functions * Moving global variables to PCMachineClass * Common pc_machine_init() function, with a compat_func hook * Some piix/q35 duplication elimination, just as a proof of concept of how we can proceed -- Eduardo