Received: from eggs.gnu.org ([2001:4830:134:3::10]:38270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvXPQ-0005l2-RI for qemu-devel@nongnu.org; Fri, 13 Jun 2014 15:45:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvXPK-0006TQ-Mz for qemu-devel@nongnu.org; Fri, 13 Jun 2014 15:45:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvXPK-0006QM-B5 for qemu-devel@nongnu.org; Fri, 13 Jun 2014 15:45:02 -0400 From: Eduardo Habkost Date: Fri, 13 Jun 2014 16:43:48 -0300 Message-Id: <1402688658-22333-10-git-send-email-ehabkost@redhat.com> In-Reply-To: <1402688658-22333-1-git-send-email-ehabkost@redhat.com> References: <1402688658-22333-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC v2 09/39] pc: Eliminate pc_common_machine_options() 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 , =?UTF-8?q?Andreas=20F=C3=A4rber?= The TYPE_PC_MACHINE parent class can initialize the common options for all PC machines. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c | 2 -- include/hw/i386/pc.h | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2618bf0..b2e0809 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1617,6 +1617,7 @@ static void pc_machine_class_init(ObjectClass *oc, void *data) pcmc->get_hotplug_handler = mc->get_hotplug_handler; mc->get_hotplug_handler = pc_get_hotpug_handler; + mc->default_boot_order = "cad"; hc->plug = pc_machine_device_plug_cb; } diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index bb7a788..8b3cffe 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -967,7 +967,6 @@ static void isapc_machine_class_init(ObjectClass *oc, void *data) static GlobalProperty compat_props[] = { { /* end of list */ } }; - pc_common_machine_options(mc); mc->desc = "ISA-only PC"; mc->init = pc_init_isa; mc->max_cpus = 1; @@ -996,7 +995,6 @@ static void xenfv_machine_class_init(ObjectClass *oc, void *data) }, { /* end of list */ } }; - pc_common_machine_options(mc); mc->desc = "Xen Fully-virtualized PC"; mc->init = pc_xen_hvm_init; mc->max_cpus = HVM_MAX_VCPUS; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index d190fef..1b09eb4 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -500,14 +500,8 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .value = stringify(0),\ } -static inline void pc_common_machine_options(MachineClass *mc) -{ - mc->default_boot_order = "cad"; -} - static inline void pc_default_machine_options(MachineClass *mc) { - pc_common_machine_options(mc); mc->hot_add_cpu = pc_hot_add_cpu; mc->max_cpus = 255; } -- 1.9.0