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: 64870 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp811292lbc; Fri, 1 Apr 2016 08:51:21 -0700 (PDT) X-Received: by 10.202.203.8 with SMTP id b8mr4639190oig.56.1459525877088; Fri, 01 Apr 2016 08:51:17 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nq8si7819049obb.92.2016.04.01.08.51.16; Fri, 01 Apr 2016 08:51:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759351AbcDAPu6 (ORCPT + 29 others); Fri, 1 Apr 2016 11:50:58 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:33569 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759336AbcDAPuy (ORCPT ); Fri, 1 Apr 2016 11:50:54 -0400 Received: by mail-pa0-f43.google.com with SMTP id zm5so93992358pac.0 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=GsDf49hNj59lkOIjjKzvyBcxIFrxxIpVnpcMWYNABb22DElMGPiZXv3bc8xXRDbT5M yDGg0a0BJdIA0BDPMtPlk0V5clv8xIqyU+tgF21YpE9zc3SMIiMl+U1FCM+NIYWx05NX TJohcAb6bNjczrPCYspNAlvrziJntDVid5pVz+4hjkZgWPUVZTr0Vvxn/iOiZIvM8nCB msTjXhBQgwxJxp/SS0I2xoiUzldbD4j+to7XtB87rwX5je4q5GHNmnM3l3ir7pGfjHpQ l1cjE5TmMYmFxjgt4xJ5tdPkWLcvaOLSOtCicnfgRyMZyaRSDz+1Bex9qOnD8Gv6X8I9 vGtA== X-Gm-Message-State: AD7BkJJFspQXMaOvo9oVZ0olMqtI6JwWn/jmf0iEYFHggwOI/jp+fnrPdC36XSHCmt5XzT6+ 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 Cc: david.vrabel@citrix.com, 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 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 Reviewed-by: Julien Grall 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