Received: from eggs.gnu.org ([2001:4830:134:3::10]:34539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzTpt-0003Dm-Mb for qemu-devel@nongnu.org; Tue, 24 Jun 2014 12:44:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzTpm-0004SB-5e for qemu-devel@nongnu.org; Tue, 24 Jun 2014 12:44:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzTpl-0004Rr-US for qemu-devel@nongnu.org; Tue, 24 Jun 2014 12:44:38 -0400 Date: Tue, 24 Jun 2014 13:44:31 -0300 From: Eduardo Habkost Message-ID: <20140624164431.GA14901@otherpad.lan.raisama.net> References: <1403108034-32054-1-git-send-email-mst@redhat.com> <1403108034-32054-27-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1403108034-32054-27-git-send-email-mst@redhat.com> Subject: [Qemu-devel] per-machine vs per-qemu-version compat_props macros (was Re: acpi:ich9: add memory hotplug handling) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Peter Maydell , Marcel Apfelbaum , Alexey Kardashevskiy , Markus Armbruster , qemu-devel@nongnu.org, Paul Mackerras , Anthony Liguori , Paolo Bonzini , Igor Mammedov , Andreas =?iso-8859-1?Q?F=E4rber?= , Alexander Graf On Wed, Jun 18, 2014 at 07:17:13PM +0300, Michael S. Tsirkin wrote: [...] > --- a/include/hw/i386/pc.h > +++ b/include/hw/i386/pc.h > @@ -286,7 +286,12 @@ int e820_get_num_entries(void); > bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); > > #define PC_Q35_COMPAT_2_0 \ > - PC_COMPAT_2_0 > + PC_COMPAT_2_0, \ > + {\ > + .driver = "ICH9 LPC",\ > + .property = "memory-hotplug-support",\ > + .value = "off",\ > + } I have been wondering why exactly we need PC_Q35_COMPAT_* macros at all. * If another machine (e.g. pc-i40fx) doesn't instantiate ICH9-LPC, it won't be affected at all by a ICH9-LPC property on compat_props; * If another machine does instantiate ICH9-LPC, it would also need the same compat property. So we could just add all the q35 compat properties to PC_COMPAT_* and stop having to maintain different sets of compat_props for pc-i440fx and pc-q35. (I would go even further and say that no compat_props bit need to be specific to a machine-type family, and they are simply tied to the code included in a QEMU version. So every PC_COMPAT_* bit could go to a common QEMU_COMPAT_ macro, that could be reusable by all machine-types, and there's no need PC-specific compat macros.) -- Eduardo