From patchwork Wed Apr 29 14:52:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 47721 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 078122121F for ; Wed, 29 Apr 2015 14:52:38 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf6987397lbb.0 for ; Wed, 29 Apr 2015 07:52:36 -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=kpJMCt67LrwuJiH4d1txPnhjTtm2KamoR+2308Ci3kqwoVjIeXLeWVTUtjDvibuKVW I8e/ytK9Bqv1S8dumbT1Co5APnmMZJT1IMrGiq3laumD1lZrrUCNtDp0dHMRCsRh60P3 JHoeVqJ+EnNfG92Q5niLioRqUg5RrNU5XakJwEg8hSKKbhmcVySuDFxhAKYicfDDr9t5 jR0OtqL8UKW0xk4aJNKf1wrMSnKo7GmifLJhn6fHCezxigK/3fpGnv/pBzg0boXBHQdf zPgfoVuQnGuCy03uMaKfAfkhZiaHEqp2RTCP0frTDc40lwHVPUW5c7uIyP2O98rwF6Zv TMsQ== X-Gm-Message-State: ALoCoQnFF0pnEO9fN0QKaEV4ZDCYDWRBZshHiNhB2SGtY0P8iDcHyIGTD8SUL6BP6FeurnpVasxW X-Received: by 10.112.42.236 with SMTP id r12mr13495774lbl.2.1430319156897; Wed, 29 Apr 2015 07:52:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.38 with SMTP id jt6ls263952lab.101.gmail; Wed, 29 Apr 2015 07:52:36 -0700 (PDT) X-Received: by 10.153.5.36 with SMTP id cj4mr19102450lad.69.1430319156761; Wed, 29 Apr 2015 07:52:36 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id tq9si19529616lbb.126.2015.04.29.07.52.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 07:52:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbqq2 with SMTP id qq2so22144013lbb.3 for ; Wed, 29 Apr 2015 07:52:36 -0700 (PDT) X-Received: by 10.152.29.161 with SMTP id l1mr18859878lah.76.1430319156650; Wed, 29 Apr 2015 07:52:36 -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 l1csp2553809lbt; Wed, 29 Apr 2015 07:52:36 -0700 (PDT) X-Received: by 10.180.103.3 with SMTP id fs3mr9443497wib.14.1430319145484; Wed, 29 Apr 2015 07:52:25 -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 on6si23788166wic.8.2015.04.29.07.52.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 07:52:25 -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 wgso17 with SMTP id o17so31196347wgs.1 for ; Wed, 29 Apr 2015 07:52:25 -0700 (PDT) X-Received: by 10.180.74.37 with SMTP id q5mr6560672wiv.59.1430319145102; Wed, 29 Apr 2015 07:52:25 -0700 (PDT) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id it5sm21555782wid.3.2015.04.29.07.52.23 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Apr 2015 07:52:24 -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, b.reynal@virtualopensystems.com, Bharat.Bhushan@freescale.com, vikrams@codeaurora.org, cornelia.huck@de.ibm.com, borntraeger@de.ibm.com Subject: [PATCH v14 08/10] intc: arm_gic_kvm: set the qemu_irq/gsi mapping Date: Wed, 29 Apr 2015 15:52:05 +0100 Message-Id: <1430319127-25907-9-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1430319127-25907-1-git-send-email-eric.auger@linaro.org> References: <1430319127-25907-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.174 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. */