From patchwork Fri Mar 25 13:48:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 8671651 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 6C9EAC0553 for ; Fri, 25 Mar 2016 13:51:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BA8F20351 for ; Fri, 25 Mar 2016 13:51:50 +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 A024420340 for ; Fri, 25 Mar 2016 13:51:49 +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 1ajS8O-0002Ke-6s; Fri, 25 Mar 2016 13:50:40 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ajS8M-0002JH-VP for xen-devel@lists.xen.org; Fri, 25 Mar 2016 13:50:39 +0000 Received: from [85.158.139.211] by server-1.bemta-5.messagelabs.com id AE/83-29419-E2245F65; Fri, 25 Mar 2016 13:50:38 +0000 X-Env-Sender: shannon.zhao@linaro.org X-Msg-Ref: server-8.tower-206.messagelabs.com!1458913836!31144904!1 X-Originating-IP: [209.85.192.169] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34118 invoked from network); 25 Mar 2016 13:50:37 -0000 Received: from mail-pf0-f169.google.com (HELO mail-pf0-f169.google.com) (209.85.192.169) by server-8.tower-206.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 25 Mar 2016 13:50:37 -0000 Received: by mail-pf0-f169.google.com with SMTP id n5so83056890pfn.2 for ; Fri, 25 Mar 2016 06:50:37 -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=bLziCroqiSdXSHGHf163xCXEFrFgxCcTCSdgOHptHiM=; b=H/2UkS1RcKL0vPSTbbw5qxf4hTPEzGbaeZ7mTAhh8AgGvlXXtkkYX85YXDDTo4qYNB VmEVT3RCkMlm42xU4AWb4A/vBB1Siv0C/DhZ6EY8vUWz+5uzRzyP/TuzDw+x8IOJsCdx FV9kSpCt7s+DK6tQnrk9/KQ5Yt0hKSxfetbOQ= 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=bLziCroqiSdXSHGHf163xCXEFrFgxCcTCSdgOHptHiM=; b=PRpJ7UVBhoAX8cWCmj0UGu4EqQyrNpxZWX9/L7GHfSc9OScVJnLk5Xz5nwK0T+d0tO WLrEe8zj2m5RyfG3qn334aFdZ153ZxPcH2WDsc3o0b93qdU/uCvjl3fyr538M+OkYHuG VnfudauNrt7yYsYj/ZaPFsqv1uKG4nokhUgQw+EopyejJCb/9jiUt9/HsIH4BR/McK0v w1BzyRLSBaCRHyfgfa41TEgQxfGeV6/FqbvZ/osoA4SSi3wLn6bohXHq9gLn/Xxb+lyf O493xjYPi5AezNQp8IpJ7QaPN9mAXDErzvQjpwAOI5FRliO7kNJ5J5Uied7apFBUPXcl 0oVg== X-Gm-Message-State: AD7BkJIM5rJHkPUUaSLOh/5on/4PJICf5wRVVn6LzlDhHkDpoQhPqE7VrCkfe1JtQJshnbwC X-Received: by 10.98.66.75 with SMTP id p72mr21496634pfa.50.1458913836274; Fri, 25 Mar 2016 06:50:36 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.2]) by smtp.gmail.com with ESMTPSA id w20sm16744178pfi.31.2016.03.25.06.50.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Mar 2016 06:50:35 -0700 (PDT) From: Shannon Zhao To: xen-devel@lists.xen.org Date: Fri, 25 Mar 2016 21:48:52 +0800 Message-Id: <1458913735-2678-20-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458913735-2678-1-git-send-email-shannon.zhao@linaro.org> References: <1458913735-2678-1-git-send-email-shannon.zhao@linaro.org> Cc: Keir Fraser , Tim Deegan , Ian Jackson , peter.huangpeng@huawei.com, julien.grall@arm.com, stefano.stabellini@citrix.com, shannon.zhao@linaro.org, Jan Beulich , zhaoshenglong@huawei.com Subject: [Xen-devel] [PATCH v7 19/22] 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). Cc: Ian Jackson Cc: Jan Beulich Cc: Keir Fraser Cc: Tim Deegan Signed-off-by: Shannon Zhao Reviewed-by: Julien Grall --- xen/include/public/hvm/params.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xen/include/public/hvm/params.h b/xen/include/public/hvm/params.h index e69c72c..f7338a3 100644 --- a/xen/include/public/hvm/params.h +++ b/xen/include/public/hvm/params.h @@ -49,11 +49,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 /* * These are not used by Xen. They are here for convenience of HVM-guest