vhost-iova-tree: Update documentation

Minor update to some of the documentation / comments in
hw/virtio/vhost-iova-tree.c.

Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Tested-by: Lei Yang <leiyang@redhat.com>
Message-Id: <20250217144936.3589907-4-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Jonah Palmer 2025-02-17 09:49:34 -05:00 committed by Michael S. Tsirkin
parent 05063f5584
commit 332859dd59

View file

@ -37,9 +37,9 @@ struct VhostIOVATree {
};
/**
* Create a new IOVA tree
* Create a new VhostIOVATree
*
* Returns the new IOVA tree
* Returns the new VhostIOVATree.
*/
VhostIOVATree *vhost_iova_tree_new(hwaddr iova_first, hwaddr iova_last)
{
@ -56,7 +56,7 @@ VhostIOVATree *vhost_iova_tree_new(hwaddr iova_first, hwaddr iova_last)
}
/**
* Delete an iova tree
* Delete a VhostIOVATree
*/
void vhost_iova_tree_delete(VhostIOVATree *iova_tree)
{
@ -69,10 +69,10 @@ void vhost_iova_tree_delete(VhostIOVATree *iova_tree)
/**
* Find the IOVA address stored from a memory address
*
* @tree: The iova tree
* @tree: The VhostIOVATree
* @map: The map with the memory address
*
* Return the stored mapping, or NULL if not found.
* Returns the stored IOVA->HVA mapping, or NULL if not found.
*/
const DMAMap *vhost_iova_tree_find_iova(const VhostIOVATree *tree,
const DMAMap *map)
@ -81,10 +81,10 @@ const DMAMap *vhost_iova_tree_find_iova(const VhostIOVATree *tree,
}
/**
* Allocate a new mapping
* Allocate a new IOVA range and add the mapping to the IOVA->HVA tree
*
* @tree: The iova tree
* @map: The iova map
* @tree: The VhostIOVATree
* @map: The IOVA mapping
* @taddr: The translated address (HVA)
*
* Returns:
@ -92,7 +92,7 @@ const DMAMap *vhost_iova_tree_find_iova(const VhostIOVATree *tree,
* - IOVA_ERR_INVALID if the map does not make sense (like size overflow)
* - IOVA_ERR_NOMEM if tree cannot allocate more space.
*
* It returns assignated iova in map->iova if return value is VHOST_DMA_MAP_OK.
* It returns an assigned IOVA in map->iova if the return value is IOVA_OK.
*/
int vhost_iova_tree_map_alloc(VhostIOVATree *tree, DMAMap *map, hwaddr taddr)
{
@ -117,9 +117,9 @@ int vhost_iova_tree_map_alloc(VhostIOVATree *tree, DMAMap *map, hwaddr taddr)
}
/**
* Remove existing mappings from iova tree
* Remove existing mappings from the IOVA-only and IOVA->HVA trees
*
* @iova_tree: The vhost iova tree
* @iova_tree: The VhostIOVATree
* @map: The map to remove
*/
void vhost_iova_tree_remove(VhostIOVATree *iova_tree, DMAMap map)