linux/drivers/virtio
Michael S. Tsirkin 8d622d21d2 virtio: fix up virtio_disable_cb
virtio_disable_cb is currently a nop for split ring with event index.
This is because it used to be always called from a callback when we know
device won't trigger more events until we update the index.  However,
now that we run with interrupts enabled a lot we also poll without a
callback so that is different: disabling callbacks will help reduce the
number of spurious interrupts.
Further, if using event index with a packed ring, and if being called
from a callback, we actually do disable interrupts which is unnecessary.

Fix both issues by tracking whenever we get a callback. If that is
the case disabling interrupts with event index can be a nop.
If not the case disable interrupts. Note: with a split ring
there's no explicit "no interrupts" value. For now we write
a fixed value so our chance of triggering an interupt
is 1/ring size. It's probably better to write something
related to the last used index there to reduce the chance
even further. For now I'm keeping it simple.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-07-03 04:51:18 -04:00
..
Kconfig virtio-pci: introduce modern device module 2021-02-23 07:52:58 -05:00
Makefile virtio-pci: introduce modern device module 2021-02-23 07:52:58 -05:00
virtio_balloon.c virtio_balloon: specify page reporting order if needed 2021-06-29 10:53:47 -07:00
virtio_dma_buf.c virtio: fix build for configs without dma-bufs 2020-08-19 06:43:28 +02:00
virtio_input.c virtio-input: add multi-touch support 2021-02-23 07:52:59 -05:00
virtio_mem.c Merge branch 'akpm' (patches from Andrew) 2021-02-26 09:50:09 -08:00
virtio_mmio.c virtio-mmio: Use to_virtio_mmio_device() to simply code 2021-03-14 04:37:35 -04:00
virtio_pci_common.c virtio-pci: check name when counting MSI-X vectors 2020-02-06 03:40:26 -05:00
virtio_pci_common.h virtio-pci: introduce modern device module 2021-02-23 07:52:58 -05:00
virtio_pci_legacy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 78 2019-05-24 17:37:51 +02:00
virtio_pci_modern_dev.c virtio_pci_modern: correct sparse tags for notify 2021-05-04 04:19:59 -04:00
virtio_pci_modern.c virtio_pci_modern: __force cast the notify mapping 2021-05-04 04:19:58 -04:00
virtio_ring.c virtio: fix up virtio_disable_cb 2021-07-03 04:51:18 -04:00
virtio_vdpa.c virtio_vdpa: don't warn when fail to disable vq 2021-02-23 07:52:58 -05:00
virtio.c virtio: remove export for virtio_config_{enable, disable} 2021-03-14 04:37:35 -04:00