From patchwork Tue Apr 28 16:51:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 47693 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A539C20553 for ; Tue, 28 Apr 2015 16:51:40 +0000 (UTC) Received: by wiun10 with SMTP id n10sf7721634wiu.1 for ; Tue, 28 Apr 2015 09:51:39 -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=zLO99RGVE78458tQQKaIgKsTy1Sb2Ei0yR6qdiH8BOA=; b=g7p009LJp3xJHRsbGroOEWK5BOHL5c1OAEeYDSQ2czEDKHjcT/PG2d/f5jCwtR90sM ROc3xJC7feqta8vYl4Il5h2RMI4XEGsm8YBCBGAFXLmx0ua5DyXul3nUDwKjut81uAWt 3rOy37jKbMWMCRdzxEtHRlrKaxMYZFipDjO80wrDPr+x3SXW76JeCi14rssgjsyWj8Dt KZHzel5W+QKn5extcAPcz5GesW94pG8OdAhdU8Jk3DCFebTRv1/MtyQsUYa0PooZT3+6 Lg0XvNNc6kBowI7pCjXiHDZlxXMrWpxEXKKk9bFRQeNGjk4j24DZIkX//qGI1QoKJgQk vqlQ== X-Gm-Message-State: ALoCoQlYsQbGbn+aV8IKwd4slKDtXhLpMHbMCUnMwvkAsgx8WUjiqciSgmFZyaO3XSvyqnNdsF3h X-Received: by 10.112.28.111 with SMTP id a15mr10738769lbh.21.1430239899919; Tue, 28 Apr 2015 09:51:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.204.103 with SMTP id kx7ls109701lac.62.gmail; Tue, 28 Apr 2015 09:51:39 -0700 (PDT) X-Received: by 10.152.238.43 with SMTP id vh11mr15372137lac.45.1430239899782; Tue, 28 Apr 2015 09:51:39 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id 3si11251070lav.0.2015.04.28.09.51.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Apr 2015 09:51:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbuc2 with SMTP id uc2so581036lbb.2 for ; Tue, 28 Apr 2015 09:51:39 -0700 (PDT) X-Received: by 10.152.8.78 with SMTP id p14mr15422999laa.19.1430239899700; Tue, 28 Apr 2015 09:51:39 -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 l1csp2002268lbt; Tue, 28 Apr 2015 09:51:39 -0700 (PDT) X-Received: by 10.194.122.105 with SMTP id lr9mr34782908wjb.153.1430239892125; Tue, 28 Apr 2015 09:51:32 -0700 (PDT) Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com. [74.125.82.45]) by mx.google.com with ESMTPS id qs6si39406376wjc.68.2015.04.28.09.51.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Apr 2015 09:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 74.125.82.45 as permitted sender) client-ip=74.125.82.45; Received: by wgen6 with SMTP id n6so741623wge.3 for ; Tue, 28 Apr 2015 09:51:31 -0700 (PDT) X-Received: by 10.194.248.132 with SMTP id ym4mr35102890wjc.74.1430239891853; Tue, 28 Apr 2015 09:51:31 -0700 (PDT) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id gs7sm17255958wib.10.2015.04.28.09.51.30 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Apr 2015 09:51:30 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, agraf@suse.de, pbonzini@redhat.com, peter.crosthwaite@xilinx.com Cc: christoffer.dall@linaro.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org, peter.maydell@linaro.org, alex.bennee@linaro.org, kim.phillips@freescale.com, b.reynal@virtualopensystems.com, Bharat.Bhushan@freescale.com, vikrams@codeaurora.org Subject: [PATCH v13 08/12] intc: arm_gic_kvm: set the qemu_irq/gsi mapping Date: Tue, 28 Apr 2015 17:51:09 +0100 Message-Id: <1430239873-31950-9-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1430239873-31950-1-git-send-email-eric.auger@linaro.org> References: <1430239873-31950-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.171 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_irqfd_notifier. Signed-off-by: Eric Auger --- v2 -> v3: - kvm_irqchip_add_qemuirq_irqfd_notifier renamed into kvm_irqchip_add_irqfd_notifier --- 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. */