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