Re: [Qemu-devel] [PATCH v2 3/3] kvm: irqchip: skip update msi when disabled

2017-05-11 Thread Peter Xu
On Thu, May 11, 2017 at 09:48:52AM +0200, Paolo Bonzini wrote: > > > On 11/05/2017 04:56, Peter Xu wrote: > >> @@ -3510,12 +3511,16 @@ static void kvm_update_msi_routes_all(void > >> *private, bool global, > >> int cnt = 0; > >> MSIRouteEntry *entry; > >> MSIMessage msg; > >> +

Re: [Qemu-devel] [PATCH v2 3/3] kvm: irqchip: skip update msi when disabled

2017-05-11 Thread Paolo Bonzini
On 11/05/2017 04:56, Peter Xu wrote: >> @@ -3510,12 +3511,16 @@ static void kvm_update_msi_routes_all(void *private, >> bool global, >> int cnt = 0; >> MSIRouteEntry *entry; >> MSIMessage msg; >> +PCIDevice *dev; >> + >> /* TODO: explicit route update */ >> QLIST_FOR

Re: [Qemu-devel] [PATCH v2 3/3] kvm: irqchip: skip update msi when disabled

2017-05-10 Thread Peter Xu
On Tue, May 09, 2017 at 02:00:44PM +0800, Peter Xu wrote: > It's possible that one device kept its irqfd/virq there even when > MSI/MSIX was disabled globally for that device. One example is > virtio-net-pci (see commit f1d0f15a6 and virtio_pci_vq_vector_mask()). > It is used as a fast path to avoi

[Qemu-devel] [PATCH v2 3/3] kvm: irqchip: skip update msi when disabled

2017-05-08 Thread Peter Xu
It's possible that one device kept its irqfd/virq there even when MSI/MSIX was disabled globally for that device. One example is virtio-net-pci (see commit f1d0f15a6 and virtio_pci_vq_vector_mask()). It is used as a fast path to avoid allocate/release irqfd/virq frequently when guest enables/disabl