~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/vhost_iotlb.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _LINUX_VHOST_IOTLB_H
  3 #define _LINUX_VHOST_IOTLB_H
  4 
  5 #include <linux/interval_tree_generic.h>
  6 
  7 struct vhost_iotlb_map {
  8         struct rb_node rb;
  9         struct list_head link;
 10         u64 start;
 11         u64 last;
 12         u64 size;
 13         u64 addr;
 14 #define VHOST_MAP_RO 0x1
 15 #define VHOST_MAP_WO 0x2
 16 #define VHOST_MAP_RW 0x3
 17         u32 perm;
 18         u32 flags_padding;
 19         u64 __subtree_last;
 20         void *opaque;
 21 };
 22 
 23 #define VHOST_IOTLB_FLAG_RETIRE 0x1
 24 
 25 struct vhost_iotlb {
 26         struct rb_root_cached root;
 27         struct list_head list;
 28         unsigned int limit;
 29         unsigned int nmaps;
 30         unsigned int flags;
 31 };
 32 
 33 int vhost_iotlb_add_range_ctx(struct vhost_iotlb *iotlb, u64 start, u64 last,
 34                               u64 addr, unsigned int perm, void *opaque);
 35 int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last,
 36                           u64 addr, unsigned int perm);
 37 void vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last);
 38 
 39 void vhost_iotlb_init(struct vhost_iotlb *iotlb, unsigned int limit,
 40                       unsigned int flags);
 41 struct vhost_iotlb *vhost_iotlb_alloc(unsigned int limit, unsigned int flags);
 42 void vhost_iotlb_free(struct vhost_iotlb *iotlb);
 43 void vhost_iotlb_reset(struct vhost_iotlb *iotlb);
 44 
 45 struct vhost_iotlb_map *
 46 vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last);
 47 struct vhost_iotlb_map *
 48 vhost_iotlb_itree_next(struct vhost_iotlb_map *map, u64 start, u64 last);
 49 
 50 void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
 51                           struct vhost_iotlb_map *map);
 52 #endif
 53 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php