From patchwork Thu Apr 23 08:49:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Auger Eric X-Patchwork-Id: 47450 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3CC562121F for ; Thu, 23 Apr 2015 08:49:52 +0000 (UTC) Received: by wgin8 with SMTP id n8sf2516831wgi.0 for ; Thu, 23 Apr 2015 01:49: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=o0oQ71wNWn5Gv58qaISrphMHm72fxnXcEXcMwEhRrHs=; b=lI1PUmyzGpgWMcG9Of7gNCcGrUDDpM3h3OCltyyw/HByIxoZo8gqgCg3UIEVqbRr1d /zDoEqNRB+3FvbGJgQuVv3oqTQT5bQg3q+GhmQ38Hmp9WK1d3SWsBgIycZDAiAr0t3ek 0GLAGgB/H/wRJheLXtsR2vjZLCR8phVyvWPTyyS84leCTZKy22xtDDOZYv0lpfY5i7JT HPSZX+OaJ5DqFPVzG1e6cyp6Fhpaq0zrX9gcK0ixVxheit2ac0p40m53WhJn7OX1nMUt GvqN/9v7mT0cCydKt5vM3gs8aTdHJj1nfa+HzyWkUqVVdvYbo7F2T9/7SfZ3del1k64N 8W7w== X-Gm-Message-State: ALoCoQltBeAjwnlqAQny3E5RYDeIAOK1DXkAiyXQT0YmfiIHE7L4BgDlPrEhXY4bCPj4MybNf2HG X-Received: by 10.152.116.115 with SMTP id jv19mr884231lab.9.1429778990590; Thu, 23 Apr 2015 01:49:50 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.42 with SMTP id j10ls259563laf.27.gmail; Thu, 23 Apr 2015 01:49:50 -0700 (PDT) X-Received: by 10.152.206.103 with SMTP id ln7mr1551548lac.40.1429778990444; Thu, 23 Apr 2015 01:49:50 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id k7si5533570lbj.50.2015.04.23.01.49.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 01:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbbzk7 with SMTP id zk7so8211692lbb.0 for ; Thu, 23 Apr 2015 01:49:50 -0700 (PDT) X-Received: by 10.153.8.167 with SMTP id dl7mr1543873lad.86.1429778990370; Thu, 23 Apr 2015 01:49:50 -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 l1csp435443lbt; Thu, 23 Apr 2015 01:49:49 -0700 (PDT) X-Received: by 10.180.88.72 with SMTP id be8mr3953828wib.42.1429778987064; Thu, 23 Apr 2015 01:49:47 -0700 (PDT) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com. [209.85.212.173]) by mx.google.com with ESMTPS id t10si13203933wia.63.2015.04.23.01.49.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 01:49:47 -0700 (PDT) Received-SPF: pass (google.com: domain of eric.auger@linaro.org designates 209.85.212.173 as permitted sender) client-ip=209.85.212.173; Received: by wiun10 with SMTP id n10so84442295wiu.1 for ; Thu, 23 Apr 2015 01:49:46 -0700 (PDT) X-Received: by 10.180.7.169 with SMTP id k9mr13510011wia.70.1429778986808; Thu, 23 Apr 2015 01:49:46 -0700 (PDT) Received: from midway01-04-00.lavalab ([81.128.185.50]) by mx.google.com with ESMTPSA id k9sm28007649wia.6.2015.04.23.01.49.45 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Apr 2015 01:49:45 -0700 (PDT) From: Eric Auger To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org, alex.williamson@redhat.com, peter.maydell@linaro.org, agraf@suse.de, pbonzini@redhat.com Cc: christoffer.dall@linaro.org, kvmarm@lists.cs.columbia.edu, patches@linaro.org Subject: [PATCH 2/2] intc: arm_gic_kvm: set the get_gsi callback Date: Thu, 23 Apr 2015 09:49:37 +0100 Message-Id: <1429778977-1632-3-git-send-email-eric.auger@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1429778977-1632-1-git-send-email-eric.auger@linaro.org> References: <1429778977-1632-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.179 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 sets the get_gsi_cb callback so that the global system interrupt of a qemu_irq can be retrieved. This enables VFIO platform signaling to be setup. Signed-off-by: Eric Auger --- hw/intc/arm_gic_kvm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c index e1952ad..8a97a5b 100644 --- a/hw/intc/arm_gic_kvm.c +++ b/hw/intc/arm_gic_kvm.c @@ -87,6 +87,11 @@ static void kvm_arm_gic_set_irq(void *opaque, int irq, int level) kvm_set_irq(kvm_state, kvm_irq, !!level); } +static int kvm_gic_get_gsi(int pin) +{ + return pin; +} + static bool kvm_arm_gic_can_save_restore(GICState *s) { return s->dev_fd >= 0; @@ -554,6 +559,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); + qemu_irq_set_get_gsi_cb(irq, kvm_gic_get_gsi); + } /* We never use our outbound IRQ lines but provide them so that * we maintain the same interface as the non-KVM GIC. */