From patchwork Thu Mar 24 14:44:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 8662021 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5F17CC0553 for ; Thu, 24 Mar 2016 14:54:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67FAB203A0 for ; Thu, 24 Mar 2016 14:54:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8B875203B5 for ; Thu, 24 Mar 2016 14:54:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aj6cu-0003VO-3M; Thu, 24 Mar 2016 14:52:44 +0000 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aj6YC-0006Y4-EY for linux-arm-kernel@lists.infradead.org; Thu, 24 Mar 2016 14:47:55 +0000 Received: by mail-pf0-x230.google.com with SMTP id u190so59602757pfb.3 for ; Thu, 24 Mar 2016 07:47:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zRPRD0NaHYQzh+Ww6nqdg5GBvdYfSAbo5StF/B1CI9c=; b=H9RSuuaY+Yob31mXA9bn/1UjwHQ+d2ZKZZeyq2trJQ80Xz1nR04GL9c0l4g17/kjzM Zfh0NzDY7y3YFEG05vaCRR5WOJ3UBPAlugAJbTXmnML46FqbVyVa9y1fRTfUldKUiOa8 Otp+mkU2dcVUV/gmDYt3Xi9mdZgWV8HhD+uvM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zRPRD0NaHYQzh+Ww6nqdg5GBvdYfSAbo5StF/B1CI9c=; b=ECYjZTT/TCugOuYMyP5MH0VdQOk1PZ1v0EGc9OU6p2UcYsYgl1ndYTnzg2OQKPAla3 Ol0l4ncSuJNUCYMTztCpsaGWYRJhpWuEZ16ELyTdNmoC6iZ0g54Q1GqPHnfWC3kaq5kq mDIjBrsfKRESA8foeY5Pvtnc/SuR704cTv92XH4V7iOn200GzzeS7T8lpHw2b0hKXQkh IpZC45GjZdCRYO+DRb/b2zzgpL5H5PAUlT7p/wEn0/l7qdQYOyqdWlwyOW7MtCxTR+w7 enWIo+np1JdAOyzWfqPt9Shvz+OxLBw9B1yv3q6yX3zGq6O+CqI0K9aUOHQAs+ctrC8H l1Tg== X-Gm-Message-State: AD7BkJJhNysPMUt/wjCwdKo/z8U+0LvJ+d+7Vb13yMYS/SI76J671p0KMrMnAGZs+tBW1rFE X-Received: by 10.98.15.23 with SMTP id x23mr13489749pfi.60.1458830851997; Thu, 24 Mar 2016 07:47:31 -0700 (PDT) Received: from localhost.localdomain ([104.238.45.135]) by smtp.gmail.com with ESMTPSA id lq10sm10780673pab.36.2016.03.24.07.47.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Mar 2016 07:47:30 -0700 (PDT) From: Shannon Zhao To: linux-arm-kernel@lists.infradead.org, stefano.stabellini@citrix.com, david.vrabel@citrix.com Subject: [PATCH v7 09/17] xen/hvm/params: Add a new delivery type for event-channel in HVM_PARAM_CALLBACK_IRQ Date: Thu, 24 Mar 2016 22:44:28 +0800 Message-Id: <1458830676-27075-10-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458830676-27075-1-git-send-email-shannon.zhao@linaro.org> References: <1458830676-27075-1-git-send-email-shannon.zhao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160324_074752_907507_44649163 X-CRM114-Status: GOOD ( 11.37 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-efi@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, peter.huangpeng@huawei.com, julien.grall@arm.com, shannon.zhao@linaro.org, zhaoshenglong@huawei.com, xen-devel@lists.xen.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This new delivery type which is for ARM shares the same value with HVM_PARAM_CALLBACK_TYPE_VECTOR which is for x86. val[15:8] is flag: val[7:0] is a PPI. To the flag, bit 8 stands the interrupt mode is edge(1) or level(0) and bit 9 stands the interrupt polarity is active low(1) or high(0). Signed-off-by: Shannon Zhao Acked-by: Stefano Stabellini --- include/xen/interface/hvm/params.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/xen/interface/hvm/params.h b/include/xen/interface/hvm/params.h index 70ad208..4d61fc5 100644 --- a/include/xen/interface/hvm/params.h +++ b/include/xen/interface/hvm/params.h @@ -47,11 +47,24 @@ * Domain = val[47:32], Bus = val[31:16] DevFn = val[15:8], IntX = val[1:0] */ +#if defined(__i386__) || defined(__x86_64__) #define HVM_PARAM_CALLBACK_TYPE_VECTOR 2 /* * val[7:0] is a vector number. Check for XENFEAT_hvm_callback_vector to know * if this delivery method is available. */ +#elif defined(__arm__) || defined(__aarch64__) +#define HVM_PARAM_CALLBACK_TYPE_PPI 2 +/* + * val[55:16] needs to be zero. + * val[15:8] is interrupt flag of the PPI used by event-channel: + * bit 8: the PPI is edge(1) or level(0) triggered + * bit 9: the PPI is active low(1) or high(0) + * val[7:0] is a PPI number used by event-channel. + * This is only used by ARM/ARM64 and masking/eoi the interrupt associated to + * the notification is handled by the interrupt controller. + */ +#endif #define HVM_PARAM_STORE_PFN 1 #define HVM_PARAM_STORE_EVTCHN 2