From: Li Chengyuan <chengyuanli@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [Bug 1465935] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed
Date: Mon, 29 Jun 2015 14:34:17 -0000 [thread overview]
Message-ID: <20150629143417.15568.75734.malone@wampee.canonical.com> (raw)
In-Reply-To: 20150617052649.30965.88731.malonedeb@wampee.canonical.com
>From kvm_pc_setup_irq_routing() function, we can see that 15 routes from
PIC and 23 routes from IOAPIC are added into irq route table, but only
23 irq(gsi) are reserved. This leads to irq route table has been full
but there are still tens of free gsi. So the "retry" part of
kvm_irqchip_get_virq() shall never have chance to be executed.
void kvm_pc_setup_irq_routing(bool pci_enabled)
{
KVMState *s = kvm_state;
int i;
if (kvm_check_extension(s, KVM_CAP_IRQ_ROUTING)) {
for (i = 0; i < 8; ++i) {
if (i == 2) {
continue;
}
kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_MASTER, i);
}
for (i = 8; i < 16; ++i) {
kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_PIC_SLAVE, i - 8);
}
if (pci_enabled) {
for (i = 0; i < 24; ++i) {
if (i == 0) {
kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, 2);
} else if (i != 2) {
kvm_irqchip_add_irq_route(s, i, KVM_IRQCHIP_IOAPIC, i);
}
}
}
kvm_irqchip_commit_routes(s);
}
}
static int kvm_irqchip_get_virq(KVMState *s)
{
uint32_t *word = s->used_gsi_bitmap;
int max_words = ALIGN(s->gsi_count, 32) / 32;
int i, bit;
bool retry = true;
again:
/* Return the lowest unused GSI in the bitmap */
for (i = 0; i < max_words; i++) {
bit = ffs(~word[i]);
if (!bit) {
continue;
}
return bit - 1 + i * 32;
}
if (!s->direct_msi && retry) {
retry = false;
kvm_flush_dynamic_msi_routes(s);
goto again;
}
return -ENOSPC;
}
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1465935
Title:
kvm_irqchip_commit_routes: Assertion `ret == 0' failed
Status in QEMU:
New
Status in qemu package in Ubuntu:
New
Bug description:
Several my QEMU instances crashed, and in the qemu log, I can see
this assertion failure,
qemu-system-x86_64: /build/buildd/qemu-2.0.0+dfsg/kvm-all.c:984:
kvm_irqchip_commit_routes: Assertion `ret == 0' failed.
The QEMU version is 2.0.0, HV OS is ubuntu 12.04, kernel 3.2.0-38.
Guest OS is RHEL 6.3.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1465935/+subscriptions
next prev parent reply other threads:[~2015-06-29 14:41 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-17 5:26 [Qemu-devel] [Bug 1465935] [NEW] kvm_irqchip_commit_routes: Assertion `ret == 0' failed Li Chengyuan
2015-06-29 1:57 ` [Qemu-devel] [Bug 1465935] " Li Chengyuan
2015-06-29 2:02 ` Li Chengyuan
2015-06-29 2:44 ` Li Chengyuan
2015-06-29 8:12 ` Li Chengyuan
2015-06-29 14:34 ` Li Chengyuan [this message]
2015-06-29 15:13 ` Ryan Harper
2015-06-29 19:56 ` Ryan Harper
2015-06-29 19:57 ` Ryan Harper
2015-06-30 3:02 ` Li Chengyuan
2015-06-30 3:03 ` Li Chengyuan
2015-07-01 14:10 ` Li Chengyuan
2015-07-02 2:43 ` Serge Hallyn
2015-07-15 16:50 ` Chris J Arges
2015-07-16 8:04 ` Stefan Bader
2015-07-17 7:30 ` Stefan Bader
2015-07-30 20:59 ` Li Chengyuan
2015-08-12 17:01 ` Stefan Bader
2015-10-09 9:24 ` Li Chengyuan
2015-10-09 15:03 ` Stefan Bader
2015-10-09 15:12 ` Stefan Bader
2015-10-12 10:18 ` Stefan Bader
2015-10-12 10:21 ` Stefan Bader
2015-10-12 10:42 ` Launchpad Bug Tracker
2015-10-13 0:47 ` Li Chengyuan
2015-10-13 7:34 ` Stefan Bader
2015-10-13 8:01 ` Stefan Bader
2015-10-14 13:54 ` Chris J Arges
2015-10-14 13:55 ` [Qemu-devel] [Bug 1465935] Please test proposed package Chris J Arges
2015-11-05 0:48 ` [Qemu-devel] [Bug 1465935] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed Mathew Hodson
2015-11-18 17:39 ` Serge Hallyn
2015-11-18 20:02 ` Serge Hallyn
2015-11-18 20:21 ` Serge Hallyn
2015-11-18 22:00 ` Serge Hallyn
2015-11-19 9:27 ` Paolo Bonzini
2015-11-24 18:46 ` Launchpad Bug Tracker
2015-11-24 18:46 ` [Qemu-devel] [Bug 1465935] Update Released Chris J Arges
2015-11-24 18:49 ` [Qemu-devel] [Bug 1465935] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed Launchpad Bug Tracker
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=20150629143417.15568.75734.malone@wampee.canonical.com \
--to=chengyuanli@gmail.com \
--cc=1465935@bugs.launchpad.net \
--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).