dc68054305
- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.) - Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber) - Restore 20+ local/scripts (audit, lint, test, build helpers) - Restore src/cook/scheduler.rs, status.rs, gnu-config/ - Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh - Recover TLC source from HEAD (was overwritten by 0.2.3 checkout) - Recover 11 local/docs plans from HEAD (were overwritten) - Recover qt6-wayland-smoke symlink from HEAD - Fix MOTD: remove garbled ASCII art, use clean text - Update version: 0.2.0 -> 0.2.4 in os-release, motd, config - Reduce filesystem_size: 1536 -> 512 MiB - Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages - Reduce pcid scheme log verbosity: info -> debug
53 lines
1.4 KiB
C
53 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_VHOST_IOTLB_H
|
|
#define _LINUX_VHOST_IOTLB_H
|
|
|
|
#include <linux/interval_tree_generic.h>
|
|
|
|
struct vhost_iotlb_map {
|
|
struct rb_node rb;
|
|
struct list_head link;
|
|
u64 start;
|
|
u64 last;
|
|
u64 size;
|
|
u64 addr;
|
|
#define VHOST_MAP_RO 0x1
|
|
#define VHOST_MAP_WO 0x2
|
|
#define VHOST_MAP_RW 0x3
|
|
u32 perm;
|
|
u32 flags_padding;
|
|
u64 __subtree_last;
|
|
void *opaque;
|
|
};
|
|
|
|
#define VHOST_IOTLB_FLAG_RETIRE 0x1
|
|
|
|
struct vhost_iotlb {
|
|
struct rb_root_cached root;
|
|
struct list_head list;
|
|
unsigned int limit;
|
|
unsigned int nmaps;
|
|
unsigned int flags;
|
|
};
|
|
|
|
int vhost_iotlb_add_range_ctx(struct vhost_iotlb *iotlb, u64 start, u64 last,
|
|
u64 addr, unsigned int perm, void *opaque);
|
|
int vhost_iotlb_add_range(struct vhost_iotlb *iotlb, u64 start, u64 last,
|
|
u64 addr, unsigned int perm);
|
|
void vhost_iotlb_del_range(struct vhost_iotlb *iotlb, u64 start, u64 last);
|
|
|
|
void vhost_iotlb_init(struct vhost_iotlb *iotlb, unsigned int limit,
|
|
unsigned int flags);
|
|
struct vhost_iotlb *vhost_iotlb_alloc(unsigned int limit, unsigned int flags);
|
|
void vhost_iotlb_free(struct vhost_iotlb *iotlb);
|
|
void vhost_iotlb_reset(struct vhost_iotlb *iotlb);
|
|
|
|
struct vhost_iotlb_map *
|
|
vhost_iotlb_itree_first(struct vhost_iotlb *iotlb, u64 start, u64 last);
|
|
struct vhost_iotlb_map *
|
|
vhost_iotlb_itree_next(struct vhost_iotlb_map *map, u64 start, u64 last);
|
|
|
|
void vhost_iotlb_map_free(struct vhost_iotlb *iotlb,
|
|
struct vhost_iotlb_map *map);
|
|
#endif
|