From patchwork Mon Aug 3 15:31:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 51865 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id 4096A229FD for ; Mon, 3 Aug 2015 15:32:29 +0000 (UTC) Received: by wixh2 with SMTP id h2sf30844091wix.0 for ; Mon, 03 Aug 2015 08:32:28 -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=MQywBrk5rpmkpwxVfoAIRUXy1aftraXnI/i3wBZ+QNc=; b=cYBk00BRu01h+URfmdTsw9PGvojFZgZSF7eQf/M3+8bjUKW6FFWBkiX6PzvxNDoeKk DDbJVUzhtcLc+a0krjsPHwam42hqX68r4tqrK8KUn6FlHwRByLMjSQUxlP+S9nVnFKR0 zPhQ6ppeAxSpWIHYa3/g1DnluZSP9mqKq+wPPk0rzFhsld6dJrcPW6oQgBYVLVoMGUuf FKYQUY3hGQW1YB4E6ehHO+EwTCmCwIJMDoK8CfiSq5yuSSnizMIokyhNdGH4GwFmDd6X m8wMYJft7ImWCSCxcgHtFcpbXMFJI7CvQ49Q6mYreONN9ep6JKkmEcX1N0B6VS0UJX0e rxGA== X-Gm-Message-State: ALoCoQkjvMG+StKfYpbplwdfNZbk0XX1/a53caIZLkEkT20hSbnMSXf0o9O5LbiBUTlQGgrvL5tA X-Received: by 10.112.148.101 with SMTP id tr5mr5812872lbb.13.1438615948531; Mon, 03 Aug 2015 08:32:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.67 with SMTP id q3ls563605laq.78.gmail; Mon, 03 Aug 2015 08:32:28 -0700 (PDT) X-Received: by 10.152.36.226 with SMTP id t2mr17577684laj.6.1438615948194; Mon, 03 Aug 2015 08:32:28 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id ln10si12294677lac.42.2015.08.03.08.32.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 08:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbud7 with SMTP id ud7so75985685lbb.3 for ; Mon, 03 Aug 2015 08:32:27 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr17894181lbb.56.1438615947621; Mon, 03 Aug 2015 08:32:27 -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.7.198 with SMTP id l6csp1933155lba; Mon, 3 Aug 2015 08:32:26 -0700 (PDT) X-Received: by 10.194.171.9 with SMTP id aq9mr21198008wjc.30.1438615944342; Mon, 03 Aug 2015 08:32:24 -0700 (PDT) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com. [209.85.212.176]) by mx.google.com with ESMTPS id c2si14713379wix.79.2015.08.03.08.32.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 08:32:24 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.176 as permitted sender) client-ip=209.85.212.176; Received: by wibxm9 with SMTP id xm9so126976129wib.0 for ; Mon, 03 Aug 2015 08:32:23 -0700 (PDT) X-Received: by 10.180.230.199 with SMTP id ta7mr14417973wic.1.1438615943544; Mon, 03 Aug 2015 08:32:23 -0700 (PDT) Received: from gnx2579.home (LCaen-156-56-7-90.w80-11.abo.wanadoo.fr. [80.11.198.90]) by smtp.gmail.com with ESMTPSA id ny7sm14134420wic.11.2015.08.03.08.32.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Aug 2015 08:32:22 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@linaro.org, marc.zyngier@arm.com Cc: linux-kernel@vger.kernel.org, patches@linaro.org, pbonzini@redhat.com, andre.przywara@arm.com, p.fedin@samsung.com Subject: [PATCH v3 3/7] KVM: irqchip: convey devid to kvm_set_msi Date: Mon, 3 Aug 2015 17:31:25 +0200 Message-Id: <1438615889-10892-4-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1438615889-10892-1-git-send-email-eric.auger@linaro.org> References: <1438615889-10892-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.175 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, a devid field is populated in kvm_msi struct in case the flag is set to KVM_MSI_VALID_DEVID. Let's propagate both flags and devid field in kvm_kernel_irq_routing_entry. Signed-off-by: Eric Auger --- v2 -> v3: - do not set the type to KVM_IRQ_ROUTING_EXTENDED_MSI anymore as suggested by Andre - correct msi->flags check - propagate the flags --- virt/kvm/irqchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/virt/kvm/irqchip.c b/virt/kvm/irqchip.c index 21c1424..75c9931 100644 --- a/virt/kvm/irqchip.c +++ b/virt/kvm/irqchip.c @@ -72,12 +72,14 @@ int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi) { struct kvm_kernel_irq_routing_entry route; - if (!irqchip_in_kernel(kvm) || msi->flags != 0) + if (!irqchip_in_kernel(kvm) || (msi->flags & ~KVM_MSI_VALID_DEVID)) return -EINVAL; route.msi.address_lo = msi->address_lo; route.msi.address_hi = msi->address_hi; route.msi.data = msi->data; + route.flags = msi->flags; + route.devid = msi->devid; return kvm_set_msi(&route, kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 1, false); }