From patchwork Tue Aug 16 10:25:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 74005 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1920896qga; Tue, 16 Aug 2016 03:35:02 -0700 (PDT) X-Received: by 10.36.135.68 with SMTP id f65mr20691507ite.1.1471343702591; Tue, 16 Aug 2016 03:35:02 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id 79si21311403itg.106.2016.08.16.03.35.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 03:35:02 -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 1bZbgA-00047T-Un; Tue, 16 Aug 2016 10:33:06 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZbg9-00046k-JK for xen-devel@lists.xen.org; Tue, 16 Aug 2016 10:33:05 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id D1/93-27438-0EBE2B75; Tue, 16 Aug 2016 10:33:04 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRWlGSWpSXmKPExsVSPpHPSffB603 hBvv381ks+biYxYHR4+ju30wBjFGsmXlJ+RUJrBlXnq9hLZjFVbH24n7mBsYuji5GLg4hgVOM EmtPnmeGcPYwSlydPwnI4eRgE9CV+LhxCjuILSIgK7G6aw47SBGzwHVGiTvvt7F2MXJwCAsES zw77g5SwyKgKvF89lawel4BT4n3h38zgdgSAhoSK3snsICUcwLFr01hAwkLCXhInJ65kBWiXF Di5MwnLCA2s4CExMEXL5ghWhUl2tafZIOwJSUOrrjBAnKCBMjR03ra2SESphLHGj8zT2AUnIV k1iwksxYwMq1i1ChOLSpLLdI1MtRLKspMzyjJTczM0TU0MNPLTS0uTkxPzUlMKtZLzs/dxAgM UAYg2MH4Z1nAIUZJDiYlUd6ZEzeGC/El5adUZiQWZ8QXleakFh9ilOHgUJLg3f1qU7iQYFFqe mpFWmYOMFZg0hIcPEoivKLAeBHiLS5IzC3OTIdInWJUlBLnPQDSJwCSyCjNg2uDxeclRlkpYV 5GoEOEeApSi3IzS1DlXzGKczAqCfPeB5nCk5lXAjf9FdBiJqDF+tIbQBaXJCKkpBoYhabODVq 1fdbvyKpdPHO/bXMWMfA53H5s9YMd17IrfR5s8HJbsN77YW9A+re9sbsjZvDp33vKEs6/0cS7 PLZv3YRVQhptfU+Suo59nTnNSbj28KOmvf3V266UWfjPnxkTKl/n+Dz2+vcZmfcrT8zxc1lk5 rlxy/OsNZbbtR/+sZ0SmrHx2XwdFSWW4oxEQy3mouJEAKu/M7fKAgAA X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1471343580!28677427!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.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 6215 invoked from network); 16 Aug 2016 10:33:03 -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; 16 Aug 2016 10:33:03 -0000 Received: from 172.24.1.47 (EHLO szxeml434-hub.china.huawei.com) ([172.24.1.47]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CGJ21747; Tue, 16 Aug 2016 18:26:22 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml434-hub.china.huawei.com (10.82.67.225) with Microsoft SMTP Server id 14.3.235.1; Tue, 16 Aug 2016 18:25:43 +0800 From: Shannon Zhao To: Date: Tue, 16 Aug 2016 18:25:12 +0800 Message-ID: <1471343113-10652-16-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1471343113-10652-1-git-send-email-zhaoshenglong@huawei.com> References: <1471343113-10652-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.0A020204.57B2EA52.00E1, 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: 38da3197a35192019b3270ca5c4dd6a7 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 v4 15/16] 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 The guest kernel will get the event channel interrupt information via domain param HVM_PARAM_CALLBACK_IRQ. Initialize it here. Signed-off-by: Shannon Zhao --- tools/libxl/libxl_arm.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c index 11a6f6e..d436167 100644 --- a/tools/libxl/libxl_arm.c +++ b/tools/libxl/libxl_arm.c @@ -900,8 +900,21 @@ int libxl__arch_domain_init_hw_description(libxl__gc *gc, struct xc_dom_image *dom) { int rc; + uint64_t val; assert(info->type == LIBXL_DOMAIN_TYPE_PV); + + /* Set the value of domain param HVM_PARAM_CALLBACK_IRQ. */ + val = (uint64_t)HVM_PARAM_CALLBACK_TYPE_PPI << HVM_PARAM_CALLBACK_IRQ_TYPE_SHIFT; + /* Active-low level-sensitive */ + val |= (HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_LOW_LEVEL << + HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_SHIFT); + val |= GUEST_EVTCHN_PPI & HVM_PARAM_CALLBACK_TYPE_PPI_MASK; + rc = xc_hvm_param_set(dom->xch, dom->guest_domid, HVM_PARAM_CALLBACK_IRQ, + val); + if (rc) + return rc; + rc = libxl__prepare_dtb(gc, info, state, dom); if (rc) goto out;