From patchwork Thu Jun 18 17:40:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 50050 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9BC8228CC for ; Thu, 18 Jun 2015 17:41:23 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf22435354lbc.2 for ; Thu, 18 Jun 2015 10:41:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=6wXmQ5E4l9hqZxzuHS5VojYbbkhEI61QPUq28l1Aow4=; b=k1Ailv5ONhXq8y+iph1NVNtSrpQzrckZVcg/5lVXF/psRWYJSqlmM0otaSOlmrKlxP AyOxt8jaKJmiAjGHXUzk9sjZvnMrUewIGI4tdYHehVHgJWjx3nD0SdC/f7wDxEskRiGo GKVJvm6fu6qX2w3wc/NUxDCOATC0ybNVno0RiRvBqHkzD1cXivjfn1pXz7dyM9OS705L xse4sqOmvudfbHaoE79WIWnnOObZEbJQBAg23gOpDvR3nAdy8Rw2BUookolwqH8V2A1k 3FfN3FYY46l5En/WfhwzSem+rYw/SLe37lbk2P+SWYjtmz61HCZbQoboGF8GPxYzsoMs SHkQ== X-Gm-Message-State: ALoCoQlIDRqMHHKsU9qYtLkBNfeZZK4t0NcdHDcYfWHybETQNcfYw88etpJXqhEuEFLDgU6esy1M X-Received: by 10.181.5.7 with SMTP id ci7mr605771wid.1.1434649282541; Thu, 18 Jun 2015 10:41:22 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.34 with SMTP id p2ls544340lap.32.gmail; Thu, 18 Jun 2015 10:41:22 -0700 (PDT) X-Received: by 10.112.201.74 with SMTP id jy10mr13916502lbc.94.1434649282382; Thu, 18 Jun 2015 10:41:22 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com. [209.85.217.176]) by mx.google.com with ESMTPS id kv7si6889946lac.157.2015.06.18.10.41.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2015 10:41:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176; Received: by lbbqq2 with SMTP id qq2so56956810lbb.3 for ; Thu, 18 Jun 2015 10:41:22 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr14249188lbb.56.1434649282114; Thu, 18 Jun 2015 10:41:22 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp11244lbb; Thu, 18 Jun 2015 10:41:21 -0700 (PDT) X-Received: by 10.194.77.97 with SMTP id r1mr18126820wjw.132.1434649281458; Thu, 18 Jun 2015 10:41:21 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com. [209.85.212.172]) by mx.google.com with ESMTPS id h9si15138529wje.62.2015.06.18.10.41.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2015 10:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.172 as permitted sender) client-ip=209.85.212.172; Received: by wicnd19 with SMTP id nd19so29822416wic.1 for ; Thu, 18 Jun 2015 10:41:21 -0700 (PDT) X-Received: by 10.194.77.5 with SMTP id o5mr6089246wjw.140.1434649281185; Thu, 18 Jun 2015 10:41:21 -0700 (PDT) Received: from gnx2579.home (LCaen-156-56-7-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by mx.google.com with ESMTPSA id bg6sm13222854wjc.13.2015.06.18.10.41.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2015 10:41:20 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, christoffer.dall@linaro.org, marc.zyngier@arm.com, andre.przywara@arm.com, p.fedin@samsung.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Cc: patches@linaro.org Subject: [RFC 1/6] KVM: api: add kvm_irq_routing_extended_msi Date: Thu, 18 Jun 2015 19:40:53 +0200 Message-Id: <1434649258-27065-2-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434649258-27065-1-git-send-email-eric.auger@linaro.org> References: <1434649258-27065-1-git-send-email-eric.auger@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: eric.auger@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On ARM, the MSI msg (address and data) comes along with out-of-band device ID information. The device ID encodes the device that composes the MSI msg. Let's create a new routing entry structure that enables to encode that information on top of standard MSI message Signed-off-by: Eric Auger --- Documentation/virtual/kvm/api.txt | 9 +++++++++ include/uapi/linux/kvm.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index d20fd94..bcec91e 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1419,6 +1419,7 @@ struct kvm_irq_routing_entry { struct kvm_irq_routing_irqchip irqchip; struct kvm_irq_routing_msi msi; struct kvm_irq_routing_s390_adapter adapter; + struct kvm_irq_routing_extended_msi ext_msi; __u32 pad[8]; } u; }; @@ -1427,6 +1428,7 @@ struct kvm_irq_routing_entry { #define KVM_IRQ_ROUTING_IRQCHIP 1 #define KVM_IRQ_ROUTING_MSI 2 #define KVM_IRQ_ROUTING_S390_ADAPTER 3 +#define KVM_IRQ_ROUTING_EXTENDED_MSI 4 No flags are specified so far, the corresponding field must be set to zero. @@ -1442,6 +1444,13 @@ struct kvm_irq_routing_msi { __u32 pad; }; +struct kvm_irq_routing_extended_msi { + __u32 address_lo; + __u32 address_hi; + __u32 data; + __u32 devid; +}; + struct kvm_irq_routing_s390_adapter { __u64 ind_addr; __u64 summary_addr; diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 2a23705..e3f65a0 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -829,6 +829,13 @@ struct kvm_irq_routing_msi { __u32 pad; }; +struct kvm_irq_routing_extended_msi { + __u32 address_lo; + __u32 address_hi; + __u32 data; + __u32 devid; +}; + struct kvm_irq_routing_s390_adapter { __u64 ind_addr; __u64 summary_addr; @@ -841,6 +848,7 @@ struct kvm_irq_routing_s390_adapter { #define KVM_IRQ_ROUTING_IRQCHIP 1 #define KVM_IRQ_ROUTING_MSI 2 #define KVM_IRQ_ROUTING_S390_ADAPTER 3 +#define KVM_IRQ_ROUTING_EXTENDED_MSI 4 struct kvm_irq_routing_entry { __u32 gsi; @@ -851,6 +859,7 @@ struct kvm_irq_routing_entry { struct kvm_irq_routing_irqchip irqchip; struct kvm_irq_routing_msi msi; struct kvm_irq_routing_s390_adapter adapter; + struct kvm_irq_routing_extended_msi ext_msi; __u32 pad[8]; } u; };