From patchwork Mon Jul 6 18:35:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 50777 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F3013218EA for ; Mon, 6 Jul 2015 18:37:49 +0000 (UTC) Received: by wgjx7 with SMTP id x7sf52766625wgj.3 for ; Mon, 06 Jul 2015 11:37:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=fJKboYuVZCjvC6FuDWsZP+oviW+sHrmbGZtQePWhMOk=; b=Q/ujm//s0SkxZSKKWJgvwDZCnYLZTI/e3/La+cPjpBbXsMQhbD8A5gIlTufyK7/ryE j4r/mRqzppf9k3XtJFpmNS7g8eOManh+P8UbUk/fYM6gY8YQk6aTBpjo8Veu18BSC9qR 3dspP/S19iz5gplq1BPJH+FSOW3QigNS8mqPzndOEX89df24dfrUWZg2tgE91vNZ+iQP FQI3RC5Lmeqy1ESuZldHtStAj803ddJ5r6H8EgPnBKi3gdS2V8Pmfvka1qhy8DKIXrV7 sMB7zyTTlOCh4fgD8IxLRoPjt2R84/qr9M9fpiJKQYgK0hARbO1QMuqIiVFYXuAs9S5U e3uQ== X-Gm-Message-State: ALoCoQkctxqlDctZDaNPffdGoHV3DeC8pLJ50pLx/9UBg3auYwdBCj93a48jcUZmfnnOVwPchJcL X-Received: by 10.194.81.136 with SMTP id a8mr139986wjy.2.1436207869296; Mon, 06 Jul 2015 11:37:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.137 with SMTP id f9ls732247lae.5.gmail; Mon, 06 Jul 2015 11:37:49 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr193847lak.117.1436207869049; Mon, 06 Jul 2015 11:37:49 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id i6si15935664lai.30.2015.07.06.11.37.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 11:37:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lagx9 with SMTP id x9so166424061lag.1 for ; Mon, 06 Jul 2015 11:37:49 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr265716lbb.56.1436207868953; Mon, 06 Jul 2015 11:37:48 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1896486lbb; Mon, 6 Jul 2015 11:37:47 -0700 (PDT) X-Received: by 10.70.103.70 with SMTP id fu6mr588780pdb.22.1436207866319; Mon, 06 Jul 2015 11:37:46 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id sy6si30360408pab.74.2015.07.06.11.37.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 06 Jul 2015 11:37:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:52440 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCBGy-0007Tk-8K for patch@linaro.org; Mon, 06 Jul 2015 14:37:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCBEa-00045H-0Y for qemu-devel@nongnu.org; Mon, 06 Jul 2015 14:35:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCBEX-00037R-AN for qemu-devel@nongnu.org; Mon, 06 Jul 2015 14:35:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCBEX-00037H-3F for qemu-devel@nongnu.org; Mon, 06 Jul 2015 14:35:13 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id BBFF43CA98D for ; Mon, 6 Jul 2015 18:35:12 +0000 (UTC) Received: from gimli.home (ovpn-113-190.phx2.redhat.com [10.3.113.190]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t66IZCmn003605; Mon, 6 Jul 2015 14:35:12 -0400 From: Alex Williamson To: qemu-devel@nongnu.org Date: Mon, 06 Jul 2015 12:35:12 -0600 Message-ID: <20150706183512.15635.915.stgit@gimli.home> In-Reply-To: <20150706183311.15635.76314.stgit@gimli.home> References: <20150706183311.15635.76314.stgit@gimli.home> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 06/11] intc: arm_gic_kvm: set the qemu_irq/gsi mapping X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.williamson@redhat.com 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.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Eric Auger 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 Tested-by: Vikram Sethi Acked-by: Paolo Bonzini Reviewed-by: Peter Maydell Signed-off-by: Alex Williamson --- hw/intc/arm_gic_kvm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index 2cb7d25..f56bff1 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -570,6 +570,12 @@ 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/FIQ lines but provide them so that * we maintain the same interface as the non-KVM GIC. */