From patchwork Tue May 31 05:03:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 68888 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1733568qge; Mon, 30 May 2016 22:08:27 -0700 (PDT) X-Received: by 10.31.5.143 with SMTP id 137mr843952vkf.48.1464671307704; Mon, 30 May 2016 22:08:27 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 30si22911963uak.31.2016.05.30.22.08.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 May 2016 22:08: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 1b7btl-0004py-Pd; Tue, 31 May 2016 05:07:25 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7btk-0004pa-5P for xen-devel@lists.xen.org; Tue, 31 May 2016 05:07:24 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 15/43-10668-B0C1D475; Tue, 31 May 2016 05:07:23 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGIsWRWlGSWpSXmKPExsVSPpHPSZdLxjf cYFa3lsWSj4tZHBg9ju7+zRTAGMWamZeUX5HAmnHgz0XmgoNcFVNP7GZpYLzI0cXIxSEkcIpR om1WKzOEs4dR4tjfHaxdjJwcbAK6Eh83TmEHsUUEZCVWd81hByliFtjIKPHk7Ve2LkYODmGBc ImFX1xATBYBVYk9Ex1AynkFPCXm965mAbElBDQkVvZOALM5geJHPj4Hs4UEPCRaG3cwQtQLSp yc+QQsziwgIXHwxQtmiF5Fibb1J9kgbEmJgytusICcIAFydM/f1VAJU4l7q7awTGAUnIVk1iw ksxYwMq1iVC9OLSpLLdK10EsqykzPKMlNzMzRNTQw1stNLS5OTE/NSUwq1kvOz93ECAxPBiDY wXih3fkQoyQHk5Ior9Vvn3AhvqT8lMqMxOKM+KLSnNTiQ4wyHBxKErwzpXzDhQSLUtNTK9Iyc 4CRApOW4OBREuEtBEnzFhck5hZnpkOkTjEqSonzxoMkBEASGaV5cG2w6LzEKCslzMsIdIgQT0 FqUW5mCar8K0ZxDkYlYd7tIFN4MvNK4Ka/AlrMBLQ4PsMHZHFJIkJKqoHR5emZr+cFXsstCN4 g+T1AJDj4+e4Pu34zx1S9YDr3b/7ZbeaR6X5u8e/4GiZfeOdxZmPoscVrSywuBzQd1kwyOrn5 B2v8+2ePvJ1/vLHOMp174EDjslO9Zv2sTL+LWDy5CrODLX+effC53qP4z7R4ib13hZSlPL7pv l9RdqCtf98kd/NXmyfYK7EUZyQaajEXFScCAHqcVt3JAgAA X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-15.tower-31.messagelabs.com!1464671238!38944319!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.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 50004 invoked from network); 31 May 2016 05:07:22 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-15.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 31 May 2016 05:07:22 -0000 Received: from 172.24.1.60 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.1.60]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CCK68376; Tue, 31 May 2016 13:03:42 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.235.1; Tue, 31 May 2016 13:03:32 +0800 From: Shannon Zhao To: Date: Tue, 31 May 2016 13:03:03 +0800 Message-ID: <1464670986-10256-12-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1464670986-10256-1-git-send-email-zhaoshenglong@huawei.com> References: <1464670986-10256-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.0A020201.574D1B2E.0158, 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: 4d051f6b2004c92a39f4bd9d6e7b2ed1 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 Subject: [Xen-devel] [PATCH RESEND 11/14] 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.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 1bef9b0..13259f8 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -1105,6 +1105,7 @@ static int 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; @@ -1130,7 +1131,12 @@ static int prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info, make_acpi_xsdt(gc, dom); make_acpi_rsdp(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); } int libxl__arch_domain_init_hw_description(libxl__gc *gc,