From patchwork Tue Aug 16 10:25:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 74004 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1920842qga; Tue, 16 Aug 2016 03:34:54 -0700 (PDT) X-Received: by 10.107.3.70 with SMTP id 67mr43420812iod.97.1471343694692; Tue, 16 Aug 2016 03:34:54 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id e102si5338831ioi.153.2016.08.16.03.34.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 03:34:54 -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 1bZbfw-00041r-Kf; Tue, 16 Aug 2016 10:32:52 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZbfv-00041T-Ic for xen-devel@lists.xen.org; Tue, 16 Aug 2016 10:32:51 +0000 Received: from [85.158.137.68] by server-16.bemta-3.messagelabs.com id A4/5A-29579-2DBE2B75; Tue, 16 Aug 2016 10:32:50 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRWlGSWpSXmKPExsVSPpHPSffS603 hBufuK1gs+biYxYHR4+ju30wBjFGsmXlJ+RUJrBnvd6oXTOSvOHt7A2MD432eLkYuDiGBU4wS JzacYIRw9jBKHFs2k62LkZODTUBX4uPGKewgtoiArMTqrjnsIEXMAtcZJe6838YKkhAWiJTY2 H4LrIhFQFVi24zDYHFeAU+Jbcs/MILYEgIaEit7J7B0MXJwcALFr00Bmy8k4CFxeuZCqHJBiZ Mzn7CA2MwCEhIHX7xghmhVlGhbf5INwpaUOLjiBgvIDRIgVz+c8ZsdImEqMam7jXUCo+AsJLN mIZm1gJFpFaNGcWpRWWqRrqGhXlJRZnpGSW5iZo6uoYGxXm5qcXFiempOYlKxXnJ+7iZGYIAy AMEOxtW/nQ4xSnIwKYnyzpy4MVyILyk/pTIjsTgjvqg0J7X4EKMMB4eSBK8WMOCFBItS01Mr0 jJzgLECk5bg4FES4RUFSfMWFyTmFmemQ6ROMSpKifMeeAWUEABJZJTmwbXB4vMSo6yUMC8j0C FCPAWpRbmZJajyrxjFORiVhHklQMbzZOaVwE1/BbSYCWixvvQGkMUliQgpqQZGvvaZ8vzfV+4 rfhprtpbfpsx+j+HjGRduJId9fPxOe9HxwLyE3dyCfzKrjc04577uLbE/WJEideq09gM9Rwtb g2OXn0senPJrR75/pE/k/jPTTky6ENK6rC5BIsN4sYVIqo/h+5vGgaY6vvPX25hKrGw7erfDm nPnrqYF0eutmGepVjbMM2VQYinOSDTUYi4qTgQARWLJmsoCAAA= X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1471343566!8353500!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 53199 invoked from network); 16 Aug 2016 10:32:50 -0000 Received: from szxga03-in.huawei.com (HELO szxga03-in.huawei.com) (119.145.14.66) by server-9.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 16 Aug 2016 10:32:50 -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 CGJ21746; 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:42 +0800 From: Shannon Zhao To: Date: Tue, 16 Aug 2016 18:25:11 +0800 Message-ID: <1471343113-10652-15-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.0A020201.57B2EA4E.014C, 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: 14fc63a3df8aeac53d1a020d52ad7db6 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 14/16] public/hvm/params.h: Add macros for HVM_PARAM_CALLBACK_TYPE_PPI 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 macros for HVM_PARAM_CALLBACK_TYPE_PPI operation values and update them in evtchn_fixup(). Signed-off-by: Shannon Zhao --- xen/arch/arm/domain_build.c | 8 +++++--- xen/include/public/hvm/params.h | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 60db9e4..94cd3ce 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -2019,9 +2019,11 @@ static void evtchn_fixup(struct domain *d, struct kernel_info *kinfo) d->arch.evtchn_irq); /* Set the value of domain param HVM_PARAM_CALLBACK_IRQ */ - val = (u64)HVM_PARAM_CALLBACK_TYPE_PPI << 56; - val |= (2 << 8); /* Active-low level-sensitive */ - val |= d->arch.evtchn_irq & 0xff; + val = (u64)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 |= d->arch.evtchn_irq & HVM_PARAM_CALLBACK_TYPE_PPI_MASK; d->arch.hvm_domain.params[HVM_PARAM_CALLBACK_IRQ] = val; /* diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h index f7338a3..8a0327d 100644 --- a/xen/include/public/hvm/params.h +++ b/xen/include/public/hvm/params.h @@ -30,6 +30,7 @@ */ #define HVM_PARAM_CALLBACK_IRQ 0 +#define HVM_PARAM_CALLBACK_IRQ_TYPE_SHIFT 56 /* * How should CPU0 event-channel notifications be delivered? * @@ -66,6 +67,9 @@ * This is only used by ARM/ARM64 and masking/eoi the interrupt associated to * the notification is handled by the interrupt controller. */ +#define HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_SHIFT 8 +#define HVM_PARAM_CALLBACK_TYPE_PPI_FLAG_LOW_LEVEL 2 +#define HVM_PARAM_CALLBACK_TYPE_PPI_MASK 0xff #endif /*