From patchwork Fri Apr 1 15:49:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 8726121 Return-Path: X-Original-To: patchwork-xen-devel@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 500F6C0553 for ; Fri, 1 Apr 2016 15:52:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC335203AB for ; Fri, 1 Apr 2016 15:52:47 +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 D5C7620109 for ; Fri, 1 Apr 2016 15:52:46 +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 1am1Le-0004mq-9G; Fri, 01 Apr 2016 15:50:58 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1am1Lc-0004lI-Qm for xen-devel@lists.xen.org; Fri, 01 Apr 2016 15:50:56 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id F5/BA-03786-0E89EF65; Fri, 01 Apr 2016 15:50:56 +0000 X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-11.tower-206.messagelabs.com!1459525854!20265959!1 X-Originating-IP: [209.85.220.44] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18496 invoked from network); 1 Apr 2016 15:50:55 -0000 Received: from mail-pa0-f44.google.com (HELO mail-pa0-f44.google.com) (209.85.220.44) by server-11.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 1 Apr 2016 15:50:55 -0000 Received: by mail-pa0-f44.google.com with SMTP id fe3so93904499pab.1 for ; Fri, 01 Apr 2016 08:50:55 -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=cTpoQ5g9iM8gLauuAyoWA7dBSnlNkKee7HjuxDLJsKk/BYAcrsIoDpbgCk0dpXuRdL s771hcwqaeFYq5wvE38/HE9vk3YesEe4MXHo796KOgsoBIWsqNYh8D/XjjBMytiGfmbX W5zaau8JzribbwmRKtHsu+m3RAwWfNll4arjg= 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=DsVfVRvrRdmaWK3fRDIAqpfeGwzW2nZN6xSFZSXbQRffb9/etINkfUCe3oLTzUNb27 iXxqzQERJssw/SU9u3d5JxQlm6eLyySMTMkghmJuM+2xaV7yPwbihZLaAZVV6VXg80Xv jgfJpgu3ly41MxLt9f/bCOIskiltCDD23jA+S5ibFre7c6elVzR+QmRd4uivOP6Xvldi QA/ZTXOEjq9AcMsHSV52D5xi2YS1iOw4tKlDucgYrEzfmv23Vg9Y6ngtUUstit7N03iu HtvZ2mt4Gqm+Uk8CtuNLZFQC6JJMOuQKtdl4IYIeNQgcz1HjQMTArSz/uRo7N2fzFcHw WnkQ== X-Gm-Message-State: AD7BkJKkhxesddNxRZY+83kUOVXJ5kKxARo9Q/CK2DCc19uJ8xTsHNvr5sVsHVWS2F8eAtUv X-Received: by 10.66.102.70 with SMTP id fm6mr31645696pab.98.1459525853987; Fri, 01 Apr 2016 08:50:53 -0700 (PDT) Received: from localhost.localdomain ([167.160.116.218]) by smtp.gmail.com with ESMTPSA id yj1sm22536791pac.16.2016.04.01.08.50.47 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Apr 2016 08:50:52 -0700 (PDT) From: Shannon Zhao To: linux-arm-kernel@lists.infradead.org, stefano.stabellini@citrix.com Date: Fri, 1 Apr 2016 23:49:07 +0800 Message-Id: <1459525755-36968-10-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1459525755-36968-1-git-send-email-shannon.zhao@linaro.org> References: <1459525755-36968-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, david.vrabel@citrix.com, zhaoshenglong@huawei.com, xen-devel@lists.xen.org, shannon.zhao@linaro.org Subject: [Xen-devel] [PATCH v10 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 Reviewed-by: Julien Grall --- 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