-----Original Message----- From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: 2015年7月1日 21:39 To: Li, Chengyuan Cc: kevin...@tencent.com Subject: Re: [Qemu-devel] [PATCH] Fix irq route entries exceed KVM_MAX_IRQ_ROUTES
On 30/06/2015 05:47, Li, Chengyuan wrote: > Here is my understanding, > > 1) why isn't the existing check in kvm_irqchip_get_virq enough to fix > the bug? > > 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 15 free gsi. So the "retry" part of > kvm_irqchip_get_virq() shall never have chance to be executed. > > 2) If you introduce this extra call to kvm_flush_dynamic_msi_routes, > does the existing check become obsolete? > > As gsi_count is the max number of irq route table, if below code is > merged, then existing check is obsolete and can be removed. > > + if (!s->direct_msi && s->irq_routes->nr == s->gsi_count) { > + kvm_flush_dynamic_msi_routes(s); > + } > > Please let me know if you have some other comments for the patch? Thanks! Thanks for finally clearing up my doubts about the patch! I'll apply it soon. Paolo -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1465935 Title: kvm_irqchip_commit_routes: Assertion `ret == 0' failed To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1465935/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs