From patchwork Sat Nov 5 07:19:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Peng X-Patchwork-Id: 9413617 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 30B4960585 for ; Sat, 5 Nov 2016 07:29:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2117D2A299 for ; Sat, 5 Nov 2016 07:29:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 114882A3A4; Sat, 5 Nov 2016 07:29:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9B0892A299 for ; Sat, 5 Nov 2016 07:29:13 +0000 (UTC) Received: from localhost ([::1]:42447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2vPc-0002q5-IP for patchwork-qemu-devel@patchwork.kernel.org; Sat, 05 Nov 2016 03:29:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2vOx-0002pB-0a for qemu-devel@nongnu.org; Sat, 05 Nov 2016 03:28:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2vOv-0003WA-UW for qemu-devel@nongnu.org; Sat, 05 Nov 2016 03:28:31 -0400 Received: from mga06.intel.com ([134.134.136.31]:20710) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2vOv-0003Sd-Lk for qemu-devel@nongnu.org; Sat, 05 Nov 2016 03:28:29 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP; 05 Nov 2016 00:28:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.31,595,1473145200"; d="scan'208"; a="1064281143" Received: from vmm-docker1.bj.intel.com ([10.240.193.52]) by fmsmga001.fm.intel.com with ESMTP; 05 Nov 2016 00:28:27 -0700 From: Chao Peng To: qemu-devel@nongnu.org Date: Sat, 5 Nov 2016 03:19:51 -0400 Message-Id: <1478330391-74060-5-git-send-email-chao.p.peng@linux.intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1478330391-74060-1-git-send-email-chao.p.peng@linux.intel.com> References: <1478330391-74060-1-git-send-email-chao.p.peng@linux.intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.31 Subject: [Qemu-devel] [PATCH 4/4] q35: introduce q35-lite 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: , Cc: Paolo Bonzini , Richard Henderson , Eduardo Habkost , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch introduces a light weight machine type which shares the same codebase with existing q35 machine type but with some features disabled by default. Signed-off-by: Chao Peng --- hw/i386/pc_q35.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index d042fe0..1c6b476 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -276,6 +276,15 @@ static void pc_q35_init(MachineState *machine) } } +static void pc_q35_lite_init(MachineState *machine) +{ + PCMachineState *pcms = PC_MACHINE(machine); + + pcms->smbus = false; + pcms->sata = false; + pcms->pit = false; +} + #define DEFINE_Q35_MACHINE(suffix, name, compatfn, optionfn) \ static void pc_init_##suffix(MachineState *machine) \ { \ @@ -301,6 +310,15 @@ static void pc_q35_machine_options(MachineClass *m) m->max_cpus = 288; } +static void pc_q35_lite_machine_options(MachineClass *m) +{ + pc_q35_machine_options(m); + m->alias = "q35-lite"; +} + +DEFINE_Q35_MACHINE(lite, "pc-q35-lite", pc_q35_lite_init, + pc_q35_lite_machine_options); + static void pc_q35_2_8_machine_options(MachineClass *m) { pc_q35_machine_options(m);