From patchwork Thu Jun 23 03:16:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 70717 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp217333qgy; Wed, 22 Jun 2016 20:20:46 -0700 (PDT) X-Received: by 10.107.55.132 with SMTP id e126mr44716247ioa.35.1466652030609; Wed, 22 Jun 2016 20:20:30 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id x79si5315173ioi.126.2016.06.22.20.20.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2016 20:20:30 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFv9t-0000PN-28; Thu, 23 Jun 2016 03:18:25 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFv9s-0000Nm-3M for xen-devel@lists.xen.org; Thu, 23 Jun 2016 03:18:24 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id BF/22-09256-FF45B675; Thu, 23 Jun 2016 03:18:23 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKIsWRWlGSWpSXmKPExsVSPpHPSfdfSHa 4wYG/VhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8a2l4YFj/grej8qNzBe4eli5OIQEjjDKHF3 ZQcThLOHUWJF32HGLkZODjYBXYmPG6ewg9giArISq7vmsIMUMQtcZ5S4834bK0hCWCBQYvKXx 2BFLAKqEse/nAezeQXcJX5tW84MYksIaEis7J3AAmJzCnhInJz1BCwuBFQzZ81eFoh6QYmTM5 +A2cwCEhIHX7yA6lWUaFt/kg3ClpQ4uOIGC4R9ilHiwIUMCNtUYub3mYwTGAVnIRk1C8moBYx MqxjVi1OLylKLdI30kooy0zNKchMzc3QNDcz0clOLixPTU3MSk4r1kvNzNzECg5MBCHYwLvvr dIhRkoNJSZTXyiE7XIgvKT+lMiOxOCO+qDQntfgQowwHh5IErwYw2IUEi1LTUyvSMnOAcQKTl uDgURLhdQZJ8xYXJOYWZ6ZDpE4xKkqJ8x4KBkoIgCQySvPg2mCxeYlRVkqYlxHoECGegtSi3M wSVPlXjOIcjErCvPdApvBk5pXATX8FtJgJaPGy/nSQxSWJCCmpBsYu3VXrBROkv9ZImJ/yD5J f1ST/TF9W4MODtVUccit+NQg+0dDcW/Bg0jyd6d13wu43+h1c9nj2/56XvF4LJvS8PaOa01K9 /OqlJ7cuBaz2Pfo1VrRy6nVe+eIlvud/aP9+VDu93cEnbuukjeIKn9Ksw2JYJNd4irHvPRlaf M2vxC33RceSWgUlluKMREMt5qLiRAAi36UJyAIAAA== X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1466651883!20363431!1 X-Originating-IP: [119.145.14.66] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTE5LjE0NS4xNC42NiA9PiA4NTI3\n X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked Received: (qmail 42891 invoked from network); 23 Jun 2016 03:18:22 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-5.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 23 Jun 2016 03:18:22 -0000 Received: from 172.24.1.136 (EHLO szxeml430-hub.china.huawei.com) ([172.24.1.136]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CDT13155; Thu, 23 Jun 2016 11:17:34 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.235.1; Thu, 23 Jun 2016 11:17:26 +0800 From: Shannon Zhao To: Date: Thu, 23 Jun 2016 11:16:50 +0800 Message-ID: <1466651824-6964-4-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1466651824-6964-1-git-send-email-zhaoshenglong@huawei.com> References: <1466651824-6964-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.576B54D0.0127, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6676e62401e7ff0e9ee1c0102a6a109f Cc: sstabellini@kernel.org, wei.liu2@citrix.com, ian.jackson@eu.citrix.com, peter.huangpeng@huawei.com, julien.grall@arm.com, shannon.zhao@linaro.org, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v2 03/17] libxl/arm: Add a configuration option for ARM DomU ACPI X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" From: Shannon Zhao Add a configuration option for ARM DomU so that user can deicde to use ACPI or not. This option is defaultly false. Signed-off-by: Shannon Zhao --- tools/libxl/libxl_arm.c | 3 +++ tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 4 ++++ xen/include/public/arch-arm.h | 1 + 4 files changed, 9 insertions(+) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 8f15d9b..cc5a717 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -77,6 +77,9 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc, return ERROR_FAIL; } + xc_config->acpi = libxl_defbool_val(d_config->b_info.arch_arm.acpi) + ? true : false; + return 0; } diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index ef614be..426b868 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -560,6 +560,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("arch_arm", Struct(None, [("gic_version", libxl_gic_version), + ("acpi", libxl_defbool), ])), ], dir=DIR_IN diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 6459eec..0634ffa 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -2506,6 +2506,10 @@ skip_usbdev: } } + if (xlu_cfg_get_defbool(config, "acpi", &b_info->arch_arm.acpi, 0)) { + libxl_defbool_set(&b_info->arch_arm.acpi, 0); + } + xlu_cfg_destroy(config); } diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h index 870bc3b..05e4a58 100644 --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -306,6 +306,7 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); struct xen_arch_domainconfig { /* IN/OUT */ uint8_t gic_version; + uint8_t acpi; /* IN */ uint32_t nr_spis; /*