Lines Matching refs:vmctx

77 struct vmctx {  struct
117 struct vmctx *
120 struct vmctx *vm; in vm_open()
123 vm = malloc(sizeof(struct vmctx) + strlen(name) + 1); in vm_open()
144 vm_destroy(struct vmctx *vm) in vm_destroy()
180 vm_get_lowmem_limit(struct vmctx *ctx) in vm_get_lowmem_limit()
187 vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit) in vm_set_lowmem_limit()
194 vm_set_memflags(struct vmctx *ctx, int flags) in vm_set_memflags()
201 vm_get_memflags(struct vmctx *ctx) in vm_get_memflags()
211 vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, vm_ooffset_t off, in vm_mmap_memseg()
247 vm_get_guestmem_from_ctx(struct vmctx *ctx, char **guest_baseaddr, in vm_get_guestmem_from_ctx()
258 vm_munmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, size_t len) in vm_munmap_memseg()
271 vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, in vm_mmap_getnext()
309 vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name) in vm_alloc_memseg()
350 vm_get_memseg(struct vmctx *ctx, int segid, size_t *lenp, char *namebuf, in vm_get_memseg()
371 setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char *base) in setup_memory_segment()
394 vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms) in vm_setup_memory()
460 vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len) in vm_map_gpa()
482 vm_rev_map_gpa(struct vmctx *ctx, void *addr) in vm_rev_map_gpa()
501 vm_get_name(struct vmctx *ctx, char *buf, size_t max_len) in vm_get_name()
510 vm_get_lowmem_size(struct vmctx *ctx) in vm_get_lowmem_size()
517 vm_get_highmem_size(struct vmctx *ctx) in vm_get_highmem_size()
524 vm_create_devmem(struct vmctx *ctx, int segid, const char *name, size_t len) in vm_create_devmem()
574 vm_set_desc(struct vmctx *ctx, int vcpu, int reg, in vm_set_desc()
592 vm_get_desc(struct vmctx *ctx, int vcpu, int reg, in vm_get_desc()
612 vm_get_seg_desc(struct vmctx *ctx, int vcpu, int reg, struct seg_desc *seg_desc) in vm_get_seg_desc()
622 vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val) in vm_set_register()
637 vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *ret_val) in vm_get_register()
652 vm_set_register_set(struct vmctx *ctx, int vcpu, unsigned int count, in vm_set_register_set()
669 vm_get_register_set(struct vmctx *ctx, int vcpu, unsigned int count, in vm_get_register_set()
686 vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit) in vm_run()
700 vm_suspend(struct vmctx *ctx, enum vm_suspend_how how) in vm_suspend()
710 vm_reinit(struct vmctx *ctx) in vm_reinit()
717 vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, int errcode_valid, in vm_inject_exception()
732 vm_apicid2vcpu(struct vmctx *ctx __unused, int apicid) in vm_apicid2vcpu()
742 vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector) in vm_lapic_irq()
754 vm_lapic_local_irq(struct vmctx *ctx, int vcpu, int vector) in vm_lapic_local_irq()
766 vm_lapic_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg) in vm_lapic_msi()
778 vm_ioapic_assert_irq(struct vmctx *ctx, int irq) in vm_ioapic_assert_irq()
789 vm_ioapic_deassert_irq(struct vmctx *ctx, int irq) in vm_ioapic_deassert_irq()
800 vm_ioapic_pulse_irq(struct vmctx *ctx, int irq) in vm_ioapic_pulse_irq()
811 vm_ioapic_pincount(struct vmctx *ctx, int *pincount) in vm_ioapic_pincount()
818 vm_readwrite_kernemu_device(struct vmctx *ctx, int vcpu, vm_paddr_t gpa, in vm_readwrite_kernemu_device()
837 vm_isa_assert_irq(struct vmctx *ctx, int atpic_irq, int ioapic_irq) in vm_isa_assert_irq()
849 vm_isa_deassert_irq(struct vmctx *ctx, int atpic_irq, int ioapic_irq) in vm_isa_deassert_irq()
861 vm_isa_pulse_irq(struct vmctx *ctx, int atpic_irq, int ioapic_irq) in vm_isa_pulse_irq()
873 vm_isa_set_irq_trigger(struct vmctx *ctx, int atpic_irq, in vm_isa_set_irq_trigger()
886 vm_inject_nmi(struct vmctx *ctx, int vcpu) in vm_inject_nmi()
928 vm_get_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, in vm_get_capability()
944 vm_set_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, int val) in vm_set_capability()
957 vm_assign_pptdev(struct vmctx *ctx, int bus, int slot, int func) in vm_assign_pptdev()
970 vm_unassign_pptdev(struct vmctx *ctx, int bus, int slot, int func) in vm_unassign_pptdev()
983 vm_map_pptdev_mmio(struct vmctx *ctx, int bus, int slot, int func, in vm_map_pptdev_mmio()
1000 vm_unmap_pptdev_mmio(struct vmctx *ctx, int bus, int slot, int func, in vm_unmap_pptdev_mmio()
1016 vm_setup_pptdev_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func, in vm_setup_pptdev_msi()
1034 vm_setup_pptdev_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func, in vm_setup_pptdev_msix()
1053 vm_disable_pptdev_msix(struct vmctx *ctx, int bus, int slot, int func) in vm_disable_pptdev_msix()
1066 vm_get_stats(struct vmctx *ctx, int vcpu, struct timeval *ret_tv, in vm_get_stats()
1087 vm_get_stat_desc(struct vmctx *ctx, int index) in vm_get_stat_desc()
1099 vm_get_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state *state) in vm_get_x2apic_state()
1113 vm_set_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state state) in vm_set_x2apic_state()
1132 vcpu_reset(struct vmctx *vmctx, int vcpu) in vcpu_reset() argument
1142 error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RFLAGS, rflags); in vcpu_reset()
1147 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RIP, rip)) != 0) in vcpu_reset()
1151 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR0, cr0)) != 0) in vcpu_reset()
1154 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR3, zero)) != 0) in vcpu_reset()
1158 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR4, cr4)) != 0) in vcpu_reset()
1167 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_CS, in vcpu_reset()
1173 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CS, sel)) != 0) in vcpu_reset()
1182 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_SS, in vcpu_reset()
1187 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_DS, in vcpu_reset()
1192 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_ES, in vcpu_reset()
1197 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_FS, in vcpu_reset()
1202 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GS, in vcpu_reset()
1208 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_SS, sel)) != 0) in vcpu_reset()
1210 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_DS, sel)) != 0) in vcpu_reset()
1212 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_ES, sel)) != 0) in vcpu_reset()
1214 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_FS, sel)) != 0) in vcpu_reset()
1216 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_GS, sel)) != 0) in vcpu_reset()
1221 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RAX, zero)) != 0) in vcpu_reset()
1223 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RBX, zero)) != 0) in vcpu_reset()
1225 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RCX, zero)) != 0) in vcpu_reset()
1227 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RDX, rdx)) != 0) in vcpu_reset()
1229 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RSI, zero)) != 0) in vcpu_reset()
1231 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RDI, zero)) != 0) in vcpu_reset()
1233 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RBP, zero)) != 0) in vcpu_reset()
1235 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RSP, zero)) != 0) in vcpu_reset()
1242 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GDTR, in vcpu_reset()
1247 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_IDTR, in vcpu_reset()
1256 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_TR, 0, 0, desc_access); in vcpu_reset()
1261 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_TR, sel)) != 0) in vcpu_reset()
1268 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_LDTR, desc_base, in vcpu_reset()
1274 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_LDTR, 0)) != 0) in vcpu_reset()
1285 vm_get_gpa_pmap(struct vmctx *ctx, uint64_t gpa, uint64_t *pte, int *num) in vm_get_gpa_pmap()
1305 vm_get_hpet_capabilities(struct vmctx *ctx, uint32_t *capabilities) in vm_get_hpet_capabilities()
1318 vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_gla2gpa()
1339 vm_gla2gpa_nofault(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_gla2gpa_nofault()
1364 vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_copy_setup()
1402 vm_copy_teardown(struct vmctx *ctx __unused, int vcpu __unused, in vm_copy_teardown()
1408 vm_copyin(struct vmctx *ctx __unused, int vcpu __unused, struct iovec *iov, in vm_copyin()
1429 vm_copyout(struct vmctx *ctx __unused, int vcpu __unused, const void *vp, in vm_copyout()
1450 vm_get_cpus(struct vmctx *ctx, int which, cpuset_t *cpus) in vm_get_cpus()
1465 vm_active_cpus(struct vmctx *ctx, cpuset_t *cpus) in vm_active_cpus()
1472 vm_suspended_cpus(struct vmctx *ctx, cpuset_t *cpus) in vm_suspended_cpus()
1479 vm_debug_cpus(struct vmctx *ctx, cpuset_t *cpus) in vm_debug_cpus()
1486 vm_activate_cpu(struct vmctx *ctx, int vcpu) in vm_activate_cpu()
1498 vm_suspend_cpu(struct vmctx *ctx, int vcpu) in vm_suspend_cpu()
1510 vm_resume_cpu(struct vmctx *ctx, int vcpu) in vm_resume_cpu()
1522 vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *info1, uint64_t *info2) in vm_get_intinfo()
1538 vm_set_intinfo(struct vmctx *ctx, int vcpu, uint64_t info1) in vm_set_intinfo()
1551 vm_rtc_write(struct vmctx *ctx, int offset, uint8_t value) in vm_rtc_write()
1564 vm_rtc_read(struct vmctx *ctx, int offset, uint8_t *retval) in vm_rtc_read()
1578 vm_rtc_settime(struct vmctx *ctx, time_t secs) in vm_rtc_settime()
1590 vm_rtc_gettime(struct vmctx *ctx, time_t *secs) in vm_rtc_gettime()
1605 struct vmctx *ctx = arg; in vm_restart_instruction()
1625 vm_restore_time(struct vmctx *ctx) in vm_restore_time()
1634 vm_set_topology(struct vmctx *ctx, in vm_set_topology()
1648 vm_get_topology(struct vmctx *ctx, in vm_get_topology()
1666 vm_get_device_fd(struct vmctx *ctx) in vm_get_device_fd()