aboutsummaryrefslogtreecommitdiff
path: root/qemu-edid.c
diff options
context:
space:
mode:
authorEugenio Pérez <eperezma@redhat.com>2021-08-12 16:09:33 +0200
committerMichael S. Tsirkin <mst@redhat.com>2021-09-04 09:07:45 -0400
commite6db5df7e2c6e64846f47a6785a9a67f08574790 (patch)
tree5db9674e04eb8a82508f934462baf9e779914edb /qemu-edid.c
parent8880cc4362fde4ecdac0b2092318893118206fcf (diff)
vhost-vdpa: Do not send empty IOTLB update batches
With the introduction of the batch hinting, meaningless batches can be created with no IOTLB updates if the memory region was skipped by vhost_vdpa_listener_skipped_section. This is the case of host notifiers memory regions, device un/realize, and others. This causes the vdpa device to receive dma mapping settings with no changes, a possibly expensive operation for nothing. To avoid that, VHOST_IOTLB_BATCH_BEGIN hint is delayed until we have a meaningful (not skipped section) mapping or unmapping operation, and VHOST_IOTLB_BATCH_END is not written unless at least one of _UPDATE / _INVALIDATE has been issued. v3: * Use a bool instead of a counter avoiding potential number wrapping * Fix bad check on _commit * Move VHOST_BACKEND_F_IOTLB_BATCH check to vhost_vdpa_iotlb_batch_begin_once v2 (from RFC): * Rename misleading name * Abstract start batching function for listener_add/del Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20210812140933.226288-1-eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'qemu-edid.c')
0 files changed, 0 insertions, 0 deletions