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: 8661731 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B9BEF9FBEE for ; Thu, 24 Mar 2016 14:50:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D9749203A0 for ; Thu, 24 Mar 2016 14:50:02 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8BE9E203C2 for ; Thu, 24 Mar 2016 14:50:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj6Xv-0003EJ-0W; Thu, 24 Mar 2016 14:47:35 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aj6Xu-0003Dv-IX for xen-devel@lists.xen.org; Thu, 24 Mar 2016 14:47:34 +0000 Received: from [85.158.137.68] by server-9.bemta-3.messagelabs.com id 51/98-03814-50EF3F65; Thu, 24 Mar 2016 14:47:33 +0000 X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-4.tower-31.messagelabs.com!1458830852!21651509!1 X-Originating-IP: [209.85.192.173] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32654 invoked from network); 24 Mar 2016 14:47:33 -0000 Received: from mail-pf0-f173.google.com (HELO mail-pf0-f173.google.com) (209.85.192.173) by server-4.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 24 Mar 2016 14:47:33 -0000 Received: by mail-pf0-f173.google.com with SMTP id u190so59602758pfb.3 for ; Thu, 24 Mar 2016 07:47:33 -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=J5QjkM5KQgFc/hV/mNIU6H7rA7YnE0OmZuuJVKWvpVDcoNPywMHoUjPulnjVoCIV4B wcMDO279YyXhHgOI+unhsSUrRNR0U+i1Chspowj+FglY4n7smYHRUfm+jgDJJbnucGkx 24teKVXGXpfQxyvaBEdDeJHRTc7DCOFmRCsPJeGcDF7QVEpDQPe/6pBDldHMuAzfmc/2 KqSOS5w+zGp7pGlmjdTmRxgDRXIqPpROKFZCmjbcm84WH3VqeJ1l9YYWHcn0nmeAwaVA MlUoc8nOZbFGQ8P1escAtxxy4+00uOUDtziqE2C0K0VvsEzQJ5EWfl/Y4xYkY6rXaye2 wi8Q== X-Gm-Message-State: AD7BkJK4snIx8uttcJ3viZvIMmEx4sTszC5JGOu8EcXYwQkmiVv9I4iGjclnIiI8YpX0nwNZ 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 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> 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 Subject: [Xen-devel] [PATCH v7 09/17] xen/hvm/params: Add a new delivery type for event-channel in 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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