From patchwork Wed Jun 1 16:26:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 69047 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp192763qge; Wed, 1 Jun 2016 09:35:27 -0700 (PDT) X-Received: by 10.233.220.4 with SMTP id q4mr37714729qkf.145.1464798927235; Wed, 01 Jun 2016 09:35:27 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [208.118.235.17]) by mx.google.com with ESMTPS id w8si35313290qhw.43.2016.06.01.09.35.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 01 Jun 2016 09:35:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:43069 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8978-0002Jw-Q4 for patch@linaro.org; Wed, 01 Jun 2016 12:35:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b88zG-0005SU-GS for qemu-devel@nongnu.org; Wed, 01 Jun 2016 12:27:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b88z9-00058s-Fn for qemu-devel@nongnu.org; Wed, 01 Jun 2016 12:27:17 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:36303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b88z9-00058Z-6f for qemu-devel@nongnu.org; Wed, 01 Jun 2016 12:27:11 -0400 Received: by mail-pf0-x241.google.com with SMTP id 62so4443081pfd.3 for ; Wed, 01 Jun 2016 09:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=sKLdx8VslfDdFdn9VnDevR3eGyY2493iDTjISyOMoFM=; b=tCUERychFpQJ7jNJ+q2mO0WRA2Ia3TktB5fjL7Vb9SWrFb6hafQPp91KmQEl74u4Q1 NbUyBUypKXjZ2xA0S/e8ReZTubbCdUHPiv+s/QEFP7U6eK34NQw/3vUqTY9FlGQlxFCZ nPlVML2bumdZw/muUdf2WLP6utwLADUTfZauP2OrB30FbMAn2hvvDXmmtNtqgTy02TVv 5dN6Ge7rM1oz2NCf+CBGPiIQ9qUJdTle3ROrJqyhBtlUDbC5zPBji7TO/xaLeFdgyHuh cboAbjmGgwfK5jAnJCBQc9tthCER0bUYjYWMv1+ZpyXU5To7d8ir/fKCPFkP8vl1rYG+ lZ0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=sKLdx8VslfDdFdn9VnDevR3eGyY2493iDTjISyOMoFM=; b=VbFdGovJcuDQuy7bMcE1t94Ahwjl78Pz0ohgpUQn8a7aFpYmGuM5GXlVdaGAN5q3iu i3kERTDRzSR+4atWYdk4eF1RAZR7Sc7OYtB5fnOiqQk1wjfgiCNeuAVP6ZDLGsfnlhBG CMXY6O3+fWVWixQVmYzK6C2KVmPy06IazuzxvVbrYqAQCKH8SRJ3RCPKHVHQD38abwOT lrGNkeYZflv4yZ3Hjg9MWDS1FeW/67fEKsXXXYnWa3Idot3rmijsRq47CM1/ZNierR2o L50P/AHeV3Xx4L6L4Sn0EPiTnjoXGmyBKQmJTSwxMEhczNyAaTbKwmtox+eRTh+DYtgs T5tA== X-Gm-Message-State: ALyK8tJ9vcfpLWICm3ol/H8wHDSkJjYgXq4Ik3N7uIKkHNluVZ+5Z8xYY1/9t5Y6V26cjg== X-Received: by 10.98.44.78 with SMTP id s75mr10400253pfs.17.1464798430497; Wed, 01 Jun 2016 09:27:10 -0700 (PDT) Received: from serve.minyard.net ([108.19.215.157]) by smtp.gmail.com with ESMTPSA id g11sm49133719pfd.89.2016.06.01.09.27.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 09:27:09 -0700 (PDT) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 8F0651C9D; Wed, 1 Jun 2016 11:27:05 -0500 (CDT) Received: by t430.minyard.net (Postfix, from userid 1000) id 82F9330052A; Wed, 1 Jun 2016 11:27:03 -0500 (CDT) From: minyard@acm.org To: Igor Mammedov , "Michael S . Tsirkin" , Paolo Bonzini , qemu-devel@nongnu.org, minyard@acm.org, cminyard@mvista.com Date: Wed, 1 Jun 2016 11:26:59 -0500 Message-Id: <1464798420-12018-7-git-send-email-minyard@acm.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464798420-12018-1-git-send-email-minyard@acm.org> References: <1464798420-12018-1-git-send-email-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH v2 6/7] pc: Add 2.7 machine options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Corey Minyard Signed-off-by: Corey Minyard --- hw/i386/pc_piix.c | 16 +++++++++++++--- hw/i386/pc_q35.c | 13 +++++++++++-- include/hw/i386/pc.h | 3 +++ 3 files changed, 27 insertions(+), 5 deletions(-) -- 2.7.4 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 24e7042..bf44093 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -416,13 +416,25 @@ static void pc_i440fx_machine_options(MachineClass *m) m->default_display = "std"; } -static void pc_i440fx_2_6_machine_options(MachineClass *m) +static void pc_i440fx_2_7_machine_options(MachineClass *m) { pc_i440fx_machine_options(m); m->alias = "pc"; m->is_default = 1; } +DEFINE_I440FX_MACHINE(v2_7, "pc-i440fx-2.7", NULL, + pc_i440fx_2_7_machine_options); + + +static void pc_i440fx_2_6_machine_options(MachineClass *m) +{ + pc_i440fx_2_7_machine_options(m); + m->alias = NULL; + m->is_default = 0; + SET_MACHINE_COMPAT(m, PC_COMPAT_2_6); +} + DEFINE_I440FX_MACHINE(v2_6, "pc-i440fx-2.6", NULL, pc_i440fx_2_6_machine_options); @@ -431,8 +443,6 @@ static void pc_i440fx_2_5_machine_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pc_i440fx_2_6_machine_options(m); - m->alias = NULL; - m->is_default = 0; pcmc->save_tsc_khz = false; m->legacy_fw_cfg_order = 1; SET_MACHINE_COMPAT(m, PC_COMPAT_2_5); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 04aae89..4787df1 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -283,12 +283,22 @@ static void pc_q35_machine_options(MachineClass *m) m->no_floppy = 1; } -static void pc_q35_2_6_machine_options(MachineClass *m) +static void pc_q35_2_7_machine_options(MachineClass *m) { pc_q35_machine_options(m); m->alias = "q35"; } +DEFINE_Q35_MACHINE(v2_7, "pc-q35-2.7", NULL, + pc_q35_2_7_machine_options); + +static void pc_q35_2_6_machine_options(MachineClass *m) +{ + pc_q35_2_7_machine_options(m); + m->alias = NULL; + SET_MACHINE_COMPAT(m, PC_COMPAT_2_6); +} + DEFINE_Q35_MACHINE(v2_6, "pc-q35-2.6", NULL, pc_q35_2_6_machine_options); @@ -296,7 +306,6 @@ static void pc_q35_2_5_machine_options(MachineClass *m) { PCMachineClass *pcmc = PC_MACHINE_CLASS(m); pc_q35_2_6_machine_options(m); - m->alias = NULL; pcmc->save_tsc_khz = false; m->legacy_fw_cfg_order = 1; SET_MACHINE_COMPAT(m, PC_COMPAT_2_5); diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 9ca2309..dd6d644 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -356,6 +356,9 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t); int e820_get_num_entries(void); bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); +#define PC_COMPAT_2_6 \ + HW_COMPAT_2_6 + #define PC_COMPAT_2_5 \ HW_COMPAT_2_5