From patchwork Thu Apr 23 15:08:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 47465 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 ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8CA922121F for ; Thu, 23 Apr 2015 15:08:52 +0000 (UTC) Received: by wixv7 with SMTP id v7sf20288104wix.0 for ; Thu, 23 Apr 2015 08:08:51 -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=QDDwdWSSegs+x+rKh3yQH2jbxCuBy9obu0Vkm2IEI9Y=; b=lpw1V3ZqwWeC8k6hAHUxQ+Yq7zC+GrFliQ5G+VXaLZfnRt4uveHgyy/8kMh7i4DT9g nY6PRE2euYsGxax8SUErlj05pNgwwH39PL+UzKBePm8rVK49unpmDBr81bsxGRt85Tmf mi6SKggAmh00XsHp9gPFDVy5MwaG6P4D1XG6ySelhlcNK2udYpm5dAqgYG6L+z4hS+kH e1iy/M3lwk0f1UDlFu/06aswnaAw8f6MxSZrBNWR1dLmKeC38VRG5vafUN0dld1TvIQj wz5KR6kaTrp7ClvhSf2+RKBzE0u7IGyoLh2Wsa8RJlJR6aaLtcAsI8Yo4UDwFi3Od4yZ vRwA== X-Gm-Message-State: ALoCoQlFy7b54KA/rPU2lB1AdmmH3GmH4jSe2oV/jDwHxFq6/5Jcb9aFNc2LLBXs8fLqGMUZgTAB X-Received: by 10.152.88.73 with SMTP id be9mr1651216lab.2.1429801731884; Thu, 23 Apr 2015 08:08:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.10 with SMTP id p10ls364517lag.29.gmail; Thu, 23 Apr 2015 08:08:51 -0700 (PDT) X-Received: by 10.152.234.42 with SMTP id ub10mr2832148lac.60.1429801731536; Thu, 23 Apr 2015 08:08:51 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id k5si6143912lbp.148.2015.04.23.08.08.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 08:08:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by laat2 with SMTP id t2so14915067laa.1 for ; Thu, 23 Apr 2015 08:08:51 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr2803215lbb.112.1429801731120; Thu, 23 Apr 2015 08:08:51 -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.67.65 with SMTP id l1csp631761lbt; Thu, 23 Apr 2015 08:08:50 -0700 (PDT) X-Received: by 10.194.79.199 with SMTP id l7mr136538wjx.158.1429801728961; Thu, 23 Apr 2015 08:08:48 -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 bh8si14705419wib.100.2015.04.23.08.08.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 08:08:48 -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 wizk4 with SMTP id k4so219756002wiz.1 for ; Thu, 23 Apr 2015 08:08:48 -0700 (PDT) X-Received: by 10.194.249.201 with SMTP id yw9mr6460513wjc.5.1429801728522; Thu, 23 Apr 2015 08:08:48 -0700 (PDT) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id wo10sm12545993wjb.35.2015.04.23.08.08.47 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Apr 2015 08:08:47 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, peter.maydell@linaro.org, agraf@suse.de, pbonzini@redhat.com Cc: christoffer.dall@linaro.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, alex.williamson@redhat.com Subject: [PATCH v2 2/2] intc: arm_gic_kvm: set the qemu_irq/gsi mapping Date: Thu, 23 Apr 2015 16:08:36 +0100 Message-Id: <1429801716-8027-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1429801716-8027-1-git-send-email-eric.auger@linaro.org> References: <1429801716-8027-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.215.42 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: , The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build the hash table storing qemu_irq/gsi mappings. From that point on irqfd can be setup directly from the qemu_irq using kvm_irqchip_add_qemuirq_irqfd_notifier. Signed-off-by: Eric Auger --- hw/intc/arm_gic_kvm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index e1952ad..28506e3 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -554,6 +554,11 @@ static void kvm_arm_gic_realize(DeviceState *dev, Error **errp) */ i += (GIC_INTERNAL * s->num_cpu); qdev_init_gpio_in(dev, kvm_arm_gic_set_irq, i); + + for (i = 0; i < s->num_irq - GIC_INTERNAL; i++) { + qemu_irq irq = qdev_get_gpio_in(dev, i); + kvm_irqchip_set_qemuirq_gsi(kvm_state, irq, i); + } /* We never use our outbound IRQ lines but provide them so that * we maintain the same interface as the non-KVM GIC. */