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: 8726311 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 16DE2C0553 for ; Fri, 1 Apr 2016 15:56:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3AD13201FA for ; Fri, 1 Apr 2016 15:56:30 +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 5CA0920145 for ; Fri, 1 Apr 2016 15:56:29 +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 1am1PF-00071t-Ke; Fri, 01 Apr 2016 15:54:41 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1am1Lu-0003Bc-Va for linux-arm-kernel@lists.infradead.org; Fri, 01 Apr 2016 15:51:31 +0000 Received: by mail-pa0-x235.google.com with SMTP id fe3so93904467pab.1 for ; Fri, 01 Apr 2016 08:50:54 -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=P8S6vM25srl/r+O58zjhb2w4RsAXfPUcI2sJ4VGbCsdz4dzSqGkcDEF/CTbuuPtPoh TRZI6S/vZImjvR8qo1NvkqYs+Fcz4ib1MU9TeJRTfmyg1sLajB1E4xw2iF2V0VjlGFkQ SjQe1XDZ2QmKiyLlqCseJPPq8lInWTYusu8EnOgmptzMeTXHyDAKXF6ZTwNwMvQXSh5e 1/hEnERwC9rHfU3JJHgYozJgJEpWTLXoTg0naZUNq0/OJBYxEAEj1MW/oOegrAGQB/VU XbLF4VL4XPwQerESBaYi4M0bF2tlvWrkb6CTUfTG74zz/YFj63DKzQPokpaE5IQmWQVF PbVA== X-Gm-Message-State: AD7BkJKmhWCqMvcp0BxqKKNGDb/aTbuF6Ne8z2kL0pD/7ArZbPkZ2OtS8g2Of0VLsKyegtWJ 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 Subject: [PATCH v10 09/17] xen/hvm/params: Add a new delivery type for event-channel in HVM_PARAM_CALLBACK_IRQ 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160401_085115_744642_67AEFE4D X-CRM114-Status: GOOD ( 11.35 ) 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, david.vrabel@citrix.com, zhaoshenglong@huawei.com, xen-devel@lists.xen.org, shannon.zhao@linaro.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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,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