2 * vhost software live migration iova tree
4 * SPDX-FileCopyrightText: Red Hat, Inc. 2021
5 * SPDX-FileContributor: Author: Eugenio PĂ©rez <eperezma@redhat.com>
7 * SPDX-License-Identifier: GPL-2.0-or-later
10 #ifndef HW_VIRTIO_VHOST_IOVA_TREE_H
11 #define HW_VIRTIO_VHOST_IOVA_TREE_H
13 #include "qemu/iova-tree.h"
14 #include "exec/memory.h"
16 typedef struct VhostIOVATree VhostIOVATree
;
18 VhostIOVATree
*vhost_iova_tree_new(uint64_t iova_first
, uint64_t iova_last
);
19 void vhost_iova_tree_delete(VhostIOVATree
*iova_tree
);
20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(VhostIOVATree
, vhost_iova_tree_delete
);
22 const DMAMap
*vhost_iova_tree_find_iova(const VhostIOVATree
*iova_tree
,
24 int vhost_iova_tree_map_alloc(VhostIOVATree
*iova_tree
, DMAMap
*map
);
25 void vhost_iova_tree_remove(VhostIOVATree
*iova_tree
, const DMAMap
*map
);