Changeset View
Changeset View
Standalone View
Standalone View
lib/libvmmapi/vmmapi.h
Show First 20 Lines • Show All 105 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_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); | ||||
/* inverse operation to vm_map_gpa - extract guest address from host pointer */ | /* inverse operation to vm_map_gpa - extract guest address from host pointer */ | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
int vm_get_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, | int vm_get_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, | ||||
int *retval); | int *retval); | ||||
int vm_set_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, | int vm_set_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, | ||||
int val); | int val); | ||||
int vm_assign_pptdev(struct vmctx *ctx, int bus, int slot, int func); | int vm_assign_pptdev(struct vmctx *ctx, int bus, int slot, int func); | ||||
int vm_unassign_pptdev(struct vmctx *ctx, int bus, int slot, int func); | int vm_unassign_pptdev(struct vmctx *ctx, int bus, int slot, int func); | ||||
int vm_map_pptdev_mmio(struct vmctx *ctx, int bus, int slot, int func, | int vm_map_pptdev_mmio(struct vmctx *ctx, int bus, int slot, int func, | ||||
vm_paddr_t gpa, size_t len, vm_paddr_t hpa); | vm_paddr_t gpa, size_t len, vm_paddr_t hpa); | ||||
int vm_unmap_pptdev_mmio(struct vmctx *ctx, int bus, int slot, int func, | |||||
vm_paddr_t gpa, size_t len); | |||||
int vm_setup_pptdev_msi(struct vmctx *ctx, int vcpu, int bus, int slot, | int vm_setup_pptdev_msi(struct vmctx *ctx, int vcpu, int bus, int slot, | ||||
int func, uint64_t addr, uint64_t msg, int numvec); | int func, uint64_t addr, uint64_t msg, int numvec); | ||||
int vm_setup_pptdev_msix(struct vmctx *ctx, int vcpu, int bus, int slot, | int vm_setup_pptdev_msix(struct vmctx *ctx, int vcpu, int bus, int slot, | ||||
int func, int idx, uint64_t addr, uint64_t msg, | int func, int idx, uint64_t addr, uint64_t msg, | ||||
uint32_t vector_control); | uint32_t vector_control); | ||||
int vm_disable_pptdev_msix(struct vmctx *ctx, int bus, int slot, int func); | int vm_disable_pptdev_msix(struct vmctx *ctx, int bus, int slot, int func); | ||||
int vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *i1, uint64_t *i2); | int vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *i1, uint64_t *i2); | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |