From: Eric Auger <eric.auger@linaro.org>
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: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org,
patches@linaro.org
Subject: [Qemu-devel] [PATCH 2/2] intc: arm_gic_kvm: set the get_gsi callback
Date: Thu, 23 Apr 2015 09:49:37 +0100 [thread overview]
Message-ID: <1429778977-1632-3-git-send-email-eric.auger@linaro.org> (raw)
In-Reply-To: <1429778977-1632-1-git-send-email-eric.auger@linaro.org>
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 <eric.auger@linaro.org>
---
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.
*/
--
1.8.3.2
next prev parent reply other threads:[~2015-04-23 8:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 8:49 [Qemu-devel] [PATCH 0/2] irq: add get_gsi callback Eric Auger
2015-04-23 8:49 ` [Qemu-devel] [PATCH 1/2] " Eric Auger
2015-04-23 8:49 ` Eric Auger [this message]
2015-04-23 9:30 ` [Qemu-devel] [PATCH 0/2] " Paolo Bonzini
2015-04-23 9:40 ` Eric Auger
2015-04-23 9:58 ` Paolo Bonzini
2015-04-23 11:25 ` Eric Auger
2015-04-24 9:01 ` Eric Auger
2015-04-24 9:11 ` Paolo Bonzini
2015-04-24 9:18 ` Eric Auger
2015-04-24 9:29 ` Paolo Bonzini
2015-04-24 9:48 ` Eric Auger
2015-04-24 10:02 ` Paolo Bonzini
2015-04-24 11:59 ` Eric Auger
2015-04-24 12:04 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429778977-1632-3-git-send-email-eric.auger@linaro.org \
--to=eric.auger@linaro.org \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@st.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).