From: Eric Auger <eric.auger@linaro.org>
To: eric.auger@st.com, eric.auger@linaro.org, qemu-devel@nongnu.org,
peter.maydell@linaro.org, pbonzini@redhat.com
Cc: p.fedin@samsung.com, christoffer.dall@linaro.org, patches@linaro.org
Subject: [Qemu-devel] [PATCH for-2.5] hw/intc/arm_gic_kvm: set up a flat irqchip routing table
Date: Fri, 31 Jul 2015 16:56:45 +0100 [thread overview]
Message-ID: <1438358205-7395-1-git-send-email-eric.auger@linaro.org> (raw)
In case the kernel supports GSI routing, we set up
irqchip routing entries for GIC SPIs. This is not mandated
as long as MSI routing is not used (because the kernel sets
a default irqchip routing table). However once MSI routing gets
used (for VIRTIO-PCI vhost for example), the first call to
KVM_SET_GSI_ROUTING overrides the kernel default irqchip table.
If no routing entry exists for the GSI, any IRQFD signaling for
this GSI will fail.
Signed-off-by: Eric Auger <eric.auger@linaro.org>
---
gsi routing for ARM is functional but needs to be maturated.
The API for MSI routing still is in discussion.
See http://www.spinics.net/lists/kvm/msg118792.html
---
hw/intc/arm_gic_kvm.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hw/intc/arm_gic_kvm.c b/hw/intc/arm_gic_kvm.c
index f56bff1..58d8303 100644
--- a/hw/intc/arm_gic_kvm.c
+++ b/hw/intc/arm_gic_kvm.c
@@ -631,6 +631,18 @@ static void kvm_arm_gic_realize(DeviceState *dev, Error **errp)
KVM_DEV_ARM_VGIC_GRP_ADDR,
KVM_VGIC_V2_ADDR_TYPE_CPU,
s->dev_fd);
+
+ if (kvm_check_extension(kvm_state, KVM_CAP_IRQ_ROUTING)) {
+ /* set up irq routing */
+ kvm_init_irq_routing(kvm_state);
+ for (i = 0; i < s->num_irq - GIC_INTERNAL; ++i) {
+ kvm_irqchip_add_irq_route(kvm_state, i, 0, i);
+ }
+
+ kvm_gsi_routing_allowed = true;
+
+ kvm_irqchip_commit_routes(kvm_state);
+ }
}
static void kvm_arm_gic_class_init(ObjectClass *klass, void *data)
--
1.8.3.2
reply other threads:[~2015-07-31 15:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1438358205-7395-1-git-send-email-eric.auger@linaro.org \
--to=eric.auger@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=eric.auger@st.com \
--cc=p.fedin@samsung.com \
--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).