From patchwork Thu Jun 23 03:17:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 70714 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp217298qgy; Wed, 22 Jun 2016 20:20:37 -0700 (PDT) X-Received: by 10.107.15.149 with SMTP id 21mr47842505iop.114.1466652027217; Wed, 22 Jun 2016 20:20:27 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id h134si3065620ith.17.2016.06.22.20.20.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2016 20:20:27 -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 1bFv9a-0000BM-UX; Thu, 23 Jun 2016 03:18:06 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bFv9a-0000A0-AQ for xen-devel@lists.xen.org; Thu, 23 Jun 2016 03:18:06 +0000 Received: from [85.158.139.211] by server-11.bemta-5.messagelabs.com id C1/DB-04210-DE45B675; Thu, 23 Jun 2016 03:18:05 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBIsWRWlGSWpSXmKPExsVSPpHPSfdNSHa 4wePd6hZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8b1juWMBQu5KvYen87UwLiVo4uRi0NI4Ayj xOrpG9khnD2MEjt372bpYuTkYBPQlfi4cQo7iC0iICuxumsOWBGzwHVGiTvvt7GCJIQFgiX2X 9rGCGKzCKhKnJnbANbMK+Ahsf7CJyYQW0JAQ2Jl7wSwOCdQ/OSsJ8wgtpCAu8ScNXuh6gUlTs 58AmYzC0hIHHzxghmiV1Gibf1JNghbUuLgihssIEdICJxilHj+dDUrRMJU4uCMQ2wTGAVnIZk 1C8msBYxMqxjVi1OLylKLdI31kooy0zNKchMzc3QNDUz1clOLixPTU3MSk4r1kvNzNzECQ5QB CHYw7v3ndIhRkoNJSZTXyiE7XIgvKT+lMiOxOCO+qDQntfgQowwHh5IE77cAoJxgUWp6akVaZ g4wWmDSEhw8SiK8FoFAad7igsTc4sx0iNQpRkUpcd5/IH0CIImM0jy4NliEXmKUlRLmZQQ6RI inILUoN7MEVf4VozgHo5Iw71WQKTyZeSVw018BLWYCWrysPx1kcUkiQkqqgXHGimc2rQnehvd 68qW9HPjOtrC7X1RmYdT7VsO3QIrlGcfPkilL1yxMX/f5yiSRxT6Wn4qq2VreLX20ckOpn13j rOsNz4vn2a6wZZ28kulX7oyAOxes1px79kj89a3mTdFnt2/oPtl7VIFHu9rt1Nc38Tmh/ocmM T/TvFIv7tpjmC5se/t9ebwSS3FGoqEWc1FxIgBgDjk/ywIAAA== X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1466651880!46092794!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 5109 invoked from network); 23 Jun 2016 03:18:02 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-7.tower-206.messagelabs.com with SMTP; 23 Jun 2016 03:18:02 -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 CDT13198; Thu, 23 Jun 2016 11:17:48 +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:38 +0800 From: Shannon Zhao To: Date: Thu, 23 Jun 2016 11:17:04 +0800 Message-ID: <1466651824-6964-18-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.0A090204.576B54E0.01EB, 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: 8935d01d74c63eb9e0c9e090f467588c 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 17/17] libxl/arm: Initialize domain param HVM_PARAM_CALLBACK_IRQ 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 If Xen guest boots with ACPI, the guest kernel will get the event channel interrupt information via domain param HVM_PARAM_CALLBACK_IRQ. Initialize that domain param. Signed-off-by: Shannon Zhao --- tools/libxl/libxl_arm_acpi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_arm_acpi.c b/tools/libxl/libxl_arm_acpi.c index 263b5de..8a42125 100644 --- a/tools/libxl/libxl_arm_acpi.c +++ b/tools/libxl/libxl_arm_acpi.c @@ -348,6 +348,7 @@ int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, { const libxl_version_info *vers; int rc; + uint64_t val; /* convenience aliases */ xc_domain_configuration_t *xc_config = &state->config; @@ -373,7 +374,12 @@ int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, make_acpi_dsdt(gc, dom); link_acpi_tables(gc, dom); - return 0; + /* Set the value of domain param HVM_PARAM_CALLBACK_IRQ. */ + val = (uint64_t)HVM_PARAM_CALLBACK_TYPE_PPI << 56; + val |= (2 << 8); /* Active-low level-sensitive */ + val |= GUEST_EVTCHN_PPI & 0xff; + return xc_hvm_param_set(dom->xch, dom->guest_domid, HVM_PARAM_CALLBACK_IRQ, + val); } /*