From patchwork Thu Apr 30 12:49:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 47844 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DCFFB20553 for ; Thu, 30 Apr 2015 12:49:43 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf14529480wgi.3 for ; Thu, 30 Apr 2015 05:49:43 -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=EPoJNPagYgIQp8WwAlx+jOb2Xc8UodYuSKr9FJ3SmsehEIBSWjXbhdTgGSy6onQprM Ub4Iw6f/4Pe+fvd06XClQxDfeGl5q644MaAy7kRv8w+DUFuCZKsDE8dwuHsiHS+AlD2l oa49FjTAQCM/KmwqRbRxQ1qOz7yAra8H8OG+g/RyGuAZNMOL5l/Kfa/xCWhVU/omllb7 NGkfwqLDa7XAgBpXx+vjFfTxEpSQTFhE5E+h4xIM2ldmacANzZpPXRwy5+YmtnfhwLXB EAIeBIGVZ3ZE07FsFhfvybL2WyedeGfShC56PVy8ModrOGrmq+zx+EMIKLGULqY9hdmF Vr5w== X-Gm-Message-State: ALoCoQmLm+i3EEubDVCuCc5HD5XrTi62D5+DsBy7dyteB5M1f/EjFEudZPRCdx9UZtKjzhJoOYQf X-Received: by 10.194.236.230 with SMTP id ux6mr2450467wjc.5.1430398183179; Thu, 30 Apr 2015 05:49:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.180.202 with SMTP id dq10ls389896lac.109.gmail; Thu, 30 Apr 2015 05:49:43 -0700 (PDT) X-Received: by 10.152.28.34 with SMTP id y2mr3775043lag.14.1430398183022; Thu, 30 Apr 2015 05:49:43 -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 h5si1701754laa.48.2015.04.30.05.49.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 05:49:42 -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 labbd9 with SMTP id bd9so43334770lab.2 for ; Thu, 30 Apr 2015 05:49:42 -0700 (PDT) X-Received: by 10.112.161.226 with SMTP id xv2mr3707590lbb.106.1430398182764; Thu, 30 Apr 2015 05:49:42 -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 l1csp3093775lbt; Thu, 30 Apr 2015 05:49:42 -0700 (PDT) X-Received: by 10.194.178.227 with SMTP id db3mr2114058wjc.82.1430398175279; Thu, 30 Apr 2015 05:49:35 -0700 (PDT) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com. [209.85.212.169]) by mx.google.com with ESMTPS id h6si3859080wjy.71.2015.04.30.05.49.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 05:49:35 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.169 as permitted sender) client-ip=209.85.212.169; Received: by wizk4 with SMTP id k4so18043947wiz.1 for ; Thu, 30 Apr 2015 05:49:35 -0700 (PDT) X-Received: by 10.180.187.12 with SMTP id fo12mr5435490wic.40.1430398175030; Thu, 30 Apr 2015 05:49:35 -0700 (PDT) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id l3sm2332939wik.16.2015.04.30.05.49.33 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 Apr 2015 05:49:33 -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 Subject: [PATCH v15 08/10] intc: arm_gic_kvm: set the qemu_irq/gsi mapping Date: Thu, 30 Apr 2015 13:49:13 +0100 Message-Id: <1430398155-11214-9-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1430398155-11214-1-git-send-email-eric.auger@linaro.org> References: <1430398155-11214-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_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. */