]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio/common: Add helper to consolidate iova/end calculation
authorJoao Martins <joao.m.martins@oracle.com>
Tue, 7 Mar 2023 12:54:43 +0000 (12:54 +0000)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 7 Mar 2023 14:20:32 +0000 (07:20 -0700)
commit4ead830848e1f2571ca759ee6734bccd6e2ba3a6
treea36b6193ae290afe822f157550ec7d0055545c19
parentb92f237635054189ae10c0c98aeec9f982f1335f
vfio/common: Add helper to consolidate iova/end calculation

In preparation to be used in device dirty tracking, move the code that
calculate a iova/end range from the container/section.  This avoids
duplication on the common checks across listener callbacks.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20230307125450.62409-9-joao.m.martins@oracle.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c