OSDN Git Service

kvm: irqchip: skip update msi when disabled
authorPeter Xu <peterx@redhat.com>
Tue, 9 May 2017 06:00:44 +0000 (14:00 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Jun 2017 18:18:35 +0000 (20:18 +0200)
commitfd563564222f308e1d86847efdec8555fb472536
tree577a5bc399a1ea4dbfdf2b613706b61e0d5b4489
parent993b1f4b2ceb7b09a7153aa01d03bdf95972e61d
kvm: irqchip: skip update msi when disabled

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/disables MSIX.

However, this fast path brought a problem to msi_route_list, that the
device MSIRouteEntry is still dangling there even if MSIX disabled -
then we cannot know which message to fetch, even if we can, the messages
are meaningless. In this case, we can just simply ignore this entry.

It's safe, since when MSIX is enabled again, we'll rebuild them no
matter what.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1448813

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <1494309644-18743-4-git-send-email-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm.c