On Thu, May 05, 2016 at 11:25:59AM +0800, Peter Xu wrote: > Adding two hooks to be notified when adding/removing msi routes. On x86 > platform, one list is maintained for all existing msi routes.
Here the commit message is not accurate. Not all existing MSI routes are maintained. Only irqfd ones. There are two kinds of MSI routes: - in kvm_irqchip_add_irq_route(): before assigning IRQFD. Used by vhost, vfio, etc. - in kvm_irqchip_send_msi(): when sending direct MSI message, if direct MSI not allowed, we will first create one MSI route entry in the kernel, then trigger it. This patch only hooks the first one (irqfd case). We do not need to take care for the 2nd one, since it's only used by QEMU userspace (kvm-apic) and the messages will always do in-time translation when triggered. -- peterx
