On Fri, Dec 8, 2023 at 2:52 AM Si-Wei Liu <si-wei....@oracle.com> wrote: > > Refactoring only. No functional change. > > Signed-off-by: Si-Wei Liu <si-wei....@oracle.com> > --- > hw/virtio/trace-events | 2 +- > hw/virtio/vhost-vdpa.c | 30 ++++++++++++++++++------------ > 2 files changed, 19 insertions(+), 13 deletions(-) > > diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events > index b0239b8..3411a07 100644 > --- a/hw/virtio/trace-events > +++ b/hw/virtio/trace-events > @@ -33,7 +33,7 @@ vhost_user_create_notifier(int idx, void *n) "idx:%d n:%p" > vhost_vdpa_dma_map(void *vdpa, int fd, uint32_t msg_type, uint32_t asid, > uint64_t iova, uint64_t size, uint64_t uaddr, uint8_t perm, uint8_t type) > "vdpa_shared:%p fd: %d msg_type: %"PRIu32" asid: %"PRIu32" iova: 0x%"PRIx64" > size: 0x%"PRIx64" uaddr: 0x%"PRIx64" perm: 0x%"PRIx8" type: %"PRIu8 > vhost_vdpa_dma_unmap(void *vdpa, int fd, uint32_t msg_type, uint32_t asid, > uint64_t iova, uint64_t size, uint8_t type) "vdpa_shared:%p fd: %d msg_type: > %"PRIu32" asid: %"PRIu32" iova: 0x%"PRIx64" size: 0x%"PRIx64" type: %"PRIu8 > vhost_vdpa_map_batch_begin(void *v, int fd, uint32_t msg_type, uint8_t type) > "vdpa_shared:%p fd: %d msg_type: %"PRIu32" type: %"PRIu8 > -vhost_vdpa_listener_commit(void *v, int fd, uint32_t msg_type, uint8_t type) > "vdpa_shared:%p fd: %d msg_type: %"PRIu32" type: %"PRIu8 > +vhost_vdpa_dma_batch_end(void *v, int fd, uint32_t msg_type, uint8_t type) > "vdpa_shared:%p fd: %d msg_type: %"PRIu32" type: %"PRIu8 > vhost_vdpa_listener_region_add_unaligned(void *v, const char *name, uint64_t > offset_as, uint64_t offset_page) "vdpa_shared: %p region %s > offset_within_address_space %"PRIu64" offset_within_region %"PRIu64 > vhost_vdpa_listener_region_add(void *vdpa, uint64_t iova, uint64_t llend, > void *vaddr, bool readonly) "vdpa: %p iova 0x%"PRIx64" llend 0x%"PRIx64" > vaddr: %p read-only: %d" > vhost_vdpa_listener_region_del_unaligned(void *v, const char *name, uint64_t > offset_as, uint64_t offset_page) "vdpa_shared: %p region %s > offset_within_address_space %"PRIu64" offset_within_region %"PRIu64 > diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c > index a6c6fe5..999a97a 100644 > --- a/hw/virtio/vhost-vdpa.c > +++ b/hw/virtio/vhost-vdpa.c > @@ -198,19 +198,11 @@ static void > vhost_vdpa_dma_batch_begin_once(VhostVDPAShared *s) > } > } > > -static void vhost_vdpa_dma_batch_end_once(VhostVDPAShared *s) > +static bool vhost_vdpa_dma_batch_end(VhostVDPAShared *s) > {
I had the same comment for using "iotlb" instead of "dma". Others look good. Thanks