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: 64376 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp697410lbc; Thu, 24 Mar 2016 07:48:16 -0700 (PDT) X-Received: by 10.67.3.67 with SMTP id bu3mr13271415pad.39.1458830873340; Thu, 24 Mar 2016 07:47:53 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8si12733171pfi.16.2016.03.24.07.47.53; Thu, 24 Mar 2016 07:47:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757554AbcCXOrk (ORCPT + 7 others); Thu, 24 Mar 2016 10:47:40 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:33657 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757534AbcCXOrd (ORCPT ); Thu, 24 Mar 2016 10:47:33 -0400 Received: by mail-pf0-f176.google.com with SMTP id 4so59611902pfd.0 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=Mwo13EZ+8t/4NzTW1RwhNfJf/fK5nZI5LWD2zSbY/B/jo7jgx6ZqgiNIPop6Sr3zNy gWgm2NWtwBo09KHcgr2/8w4deLPjyrN4PzyxkpaHw2XBm2aT/mg12sVwNfGtUJTwlX6M oo5WAGc7Qy9TtZDQLjbbTFhX1y5totXuUzmvIzhUa8nDsBE/WUcap7GvzRUcKniatla3 B7rEQXGyxJYSBpJyeCxqDW1PoTPonv6jt7guLMCGVQzYqo7PtOXImAw1EWi5sXiad82a GTDtjxJ8RjyEhqClV1KPENo1qwwgyAJMMDq/cSnM8aQQ/Ji+U+ri0cRi3jxB2/nMgwu7 eRCg== X-Gm-Message-State: AD7BkJJIPzHUSR6op3OzaIuowYnMySCzzGbXjk3QGYGeT2OYeWt3oZ/GcZmaub+/2nK6fRJX 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 Cc: devicetree@vger.kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, julien.grall@arm.com, peter.huangpeng@huawei.com, xen-devel@lists.xen.org, zhaoshenglong@huawei.com, shannon.zhao@linaro.org 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> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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(+) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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