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