Changeset View
Changeset View
Standalone View
Standalone View
lib/libvmmapi/vmmapi.h
Show All 27 Lines | ||||||||||
* $FreeBSD$ | * $FreeBSD$ | |||||||||
*/ | */ | |||||||||
#ifndef _VMMAPI_H_ | #ifndef _VMMAPI_H_ | |||||||||
#define _VMMAPI_H_ | #define _VMMAPI_H_ | |||||||||
#include <sys/param.h> | #include <sys/param.h> | |||||||||
#include <sys/cpuset.h> | #include <sys/cpuset.h> | |||||||||
#include <machine/vmm.h> | ||||||||||
#include <machine/vmm_dev.h> | #include <machine/vmm_dev.h> | |||||||||
#include <stdbool.h> | #include <stdbool.h> | |||||||||
/* | /* | |||||||||
* API version for out-of-tree consumers like grub-bhyve for making compile | * API version for out-of-tree consumers like grub-bhyve for making compile | |||||||||
* time decisions. | * time decisions. | |||||||||
*/ | */ | |||||||||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | ||||||||||
/* | /* | |||||||||
* Map the memory segment identified by 'segid' into the guest address space | * Map the memory segment identified by 'segid' into the guest address space | |||||||||
* at [gpa,gpa+len) with protection 'prot'. | * at [gpa,gpa+len) with protection 'prot'. | |||||||||
*/ | */ | |||||||||
int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, | int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, | |||||||||
vm_ooffset_t segoff, size_t len, int prot); | vm_ooffset_t segoff, size_t len, int prot); | |||||||||
int vm_munmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, size_t len); | int vm_munmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, size_t len); | |||||||||
int vmmctl_open(void); | ||||||||||
markjUnsubmitted Not Done Inline Actions
markj: | ||||||||||
int vm_fcreate(int fd, const char *name, bool persistent); | ||||||||||
int vm_fdestroy(int fd, const char *name); | ||||||||||
int vm_create(const char *name); | int vm_create(const char *name); | |||||||||
int vm_get_device_fd(struct vmctx *ctx); | int vm_get_device_fd(struct vmctx *ctx); | |||||||||
struct vmctx *vm_open(const char *name); | struct vmctx *vm_open(const char *name); | |||||||||
void vm_destroy(struct vmctx *ctx); | void vm_destroy(struct vmctx *ctx); | |||||||||
int vm_parse_memsize(const char *optarg, size_t *memsize); | int vm_parse_memsize(const char *optarg, size_t *memsize); | |||||||||
int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); | int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); | |||||||||
void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); | void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); | |||||||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |