| /NextBSD/lib/libvmmapi/ |
| HD | vmmapi.h | 42 struct vmctx; 78 int vm_get_memseg(struct vmctx *ctx, int ident, size_t *lenp, char *name, 87 int vm_mmap_getnext(struct vmctx *ctx, vm_paddr_t *gpa, int *segid, 94 void *vm_create_devmem(struct vmctx *ctx, int segid, const char *name, 101 int vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, 105 struct vmctx *vm_open(const char *name); 106 void vm_destroy(struct vmctx *ctx); 108 int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); 109 void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); 110 int vm_get_gpa_pmap(struct vmctx *, uint64_t gpa, uint64_t *pte, int *num); [all …]
|
| HD | vmmapi_freebsd.c | 72 vm_setup_freebsd_registers_i386(struct vmctx *vmctx, int vcpu, uint32_t eip, in vm_setup_freebsd_registers_i386() argument 82 error = vm_get_capability(vmctx, vcpu, VM_CAP_UNRESTRICTED_GUEST, &tmp); in vm_setup_freebsd_registers_i386() 85 error = vm_set_capability(vmctx, vcpu, VM_CAP_UNRESTRICTED_GUEST, 1); in vm_setup_freebsd_registers_i386() 90 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR0, cr0)) != 0) in vm_setup_freebsd_registers_i386() 93 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR4, 0)) != 0) in vm_setup_freebsd_registers_i386() 100 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_EFER, 0))) in vm_setup_freebsd_registers_i386() 103 gdt = vm_map_gpa(vmctx, gdtbase, 0x1000); in vm_setup_freebsd_registers_i386() 109 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GDTR, in vm_setup_freebsd_registers_i386() 119 error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RFLAGS, rflags); in vm_setup_freebsd_registers_i386() 126 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_CS, in vm_setup_freebsd_registers_i386() [all …]
|
| HD | vmmapi.c | 71 struct vmctx { struct 109 struct vmctx * 112 struct vmctx *vm; in vm_open() 114 vm = malloc(sizeof(struct vmctx) + strlen(name) + 1); in vm_open() 133 vm_destroy(struct vmctx *vm) in vm_destroy() 169 vm_get_lowmem_limit(struct vmctx *ctx) in vm_get_lowmem_limit() 176 vm_set_lowmem_limit(struct vmctx *ctx, uint32_t limit) in vm_set_lowmem_limit() 183 vm_set_memflags(struct vmctx *ctx, int flags) in vm_set_memflags() 190 vm_get_memflags(struct vmctx *ctx) in vm_get_memflags() 200 vm_mmap_memseg(struct vmctx *ctx, vm_paddr_t gpa, int segid, vm_ooffset_t off, in vm_mmap_memseg() [all …]
|
| /NextBSD/usr.sbin/bhyve/ |
| HD | bhyverun.c | 77 typedef int (*vmexit_handler_t)(struct vmctx *, struct vm_exit *, int *vcpu); 78 extern int vmexit_task_switch(struct vmctx *, struct vm_exit *, int *vcpu); 99 static void vm_loop(struct vmctx *ctx, int vcpu, uint64_t rip); 116 struct vmctx *mt_ctx; 191 struct vmctx *ctx; in vm_inject_fault() 203 paddr_guest2host(struct vmctx *ctx, uintptr_t gaddr, size_t len) in paddr_guest2host() 251 fbsdrun_addcpu(struct vmctx *ctx, int fromcpu, int newcpu, uint64_t rip) in fbsdrun_addcpu() 285 fbsdrun_deletecpu(struct vmctx *ctx, int vcpu) in fbsdrun_deletecpu() 298 vmexit_handle_notify(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu, in vmexit_handle_notify() 310 vmexit_inout(struct vmctx *ctx, struct vm_exit *vme, int *pvcpu) in vmexit_inout() [all …]
|
| HD | pm.c | 57 reset_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, in reset_handler() 87 sci_assert(struct vmctx *ctx) in sci_assert() 97 sci_deassert(struct vmctx *ctx) in sci_deassert() 129 sci_update(struct vmctx *ctx) in sci_update() 152 pm1_status_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, in pm1_status_handler() 176 pm1_enable_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, in pm1_enable_handler() 204 struct vmctx *ctx; in power_button_handler() 229 pm1_control_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, in pm1_control_handler() 269 smi_cmd_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, in smi_cmd_handler() 303 sci_init(struct vmctx *ctx) in sci_init()
|
| HD | bhyverun.h | 41 struct vmctx; 46 void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len); 48 void fbsdrun_set_capabilities(struct vmctx *ctx, int cpu); 49 void fbsdrun_addcpu(struct vmctx *ctx, int fromcpu, int newcpu, uint64_t rip);
|
| HD | pci_emul.h | 43 struct vmctx; 51 int (*pe_init)(struct vmctx *, struct pci_devinst *, 58 int (*pe_cfgwrite)(struct vmctx *ctx, int vcpu, 61 int (*pe_cfgread)(struct vmctx *ctx, int vcpu, 66 void (*pe_barwrite)(struct vmctx *ctx, int vcpu, 69 uint64_t (*pe_barread)(struct vmctx *ctx, int vcpu, 113 struct vmctx *pi_vmctx; 207 int init_pci(struct vmctx *ctx);
|
| HD | pci_irq.h | 37 void pci_irq_init(struct vmctx *ctx); 40 int pirq_alloc_pin(struct vmctx *ctx); 43 void pirq_write(struct vmctx *ctx, int pin, uint8_t val);
|
| HD | acpi.h | 43 struct vmctx; 45 int acpi_build(struct vmctx *ctx, int ncpu); 52 void sci_init(struct vmctx *ctx);
|
| HD | mem.h | 34 struct vmctx; 36 typedef int (*mem_func_t)(struct vmctx *ctx, int vcpu, int dir, uint64_t addr, 54 int emulate_mem(struct vmctx *, int vcpu, uint64_t paddr, struct vie *vie,
|
| HD | inout.h | 34 struct vmctx; 40 typedef int (*inout_func_t)(struct vmctx *ctx, int vcpu, int in, int port, 73 int emulate_inout(struct vmctx *, int vcpu, struct vm_exit *vmexit,
|
| HD | pci_lpc.c | 142 lpc_uart_io_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, in lpc_uart_io_handler() 174 lpc_init(struct vmctx *ctx) in lpc_init() 345 pci_lpc_cfgwrite(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, in pci_lpc_cfgwrite() 366 pci_lpc_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, in pci_lpc_write() 372 pci_lpc_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, in pci_lpc_read() 382 pci_lpc_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) in pci_lpc_init()
|
| HD | pci_uart.c | 65 pci_uart_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, in pci_uart_write() 76 pci_uart_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, in pci_uart_read() 89 pci_uart_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) in pci_uart_init()
|
| HD | task_switch.c | 101 GETREG(struct vmctx *ctx, int vcpu, int reg) in GETREG() 112 SETREG(struct vmctx *ctx, int vcpu, int reg, uint64_t val) in SETREG() 152 sel_exception(struct vmctx *ctx, int vcpu, int vector, uint16_t sel, int ext) in sel_exception() 174 desc_table_limit_check(struct vmctx *ctx, int vcpu, uint16_t sel) in desc_table_limit_check() 204 desc_table_rw(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in desc_table_rw() 232 desc_table_read(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in desc_table_read() 239 desc_table_write(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in desc_table_write() 253 read_tss_descriptor(struct vmctx *ctx, int vcpu, struct vm_task_switch *ts, in read_tss_descriptor() 309 validate_seg_desc(struct vmctx *ctx, int vcpu, struct vm_task_switch *ts, in validate_seg_desc() 435 tss32_save(struct vmctx *ctx, int vcpu, struct vm_task_switch *task_switch, in tss32_save() [all …]
|
| HD | smbiostbl.h | 32 struct vmctx; 34 int smbios_build(struct vmctx *ctx);
|
| HD | bootrom.h | 34 struct vmctx; 36 int bootrom_init(struct vmctx *ctx, const char *romfile);
|
| HD | xmsr.h | 33 int emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t val); 34 int emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t code, uint64_t *val);
|
| HD | pci_passthru.c | 318 msix_table_write(struct vmctx *ctx, int vcpu, struct passthru_softc *sc, in msix_table_write() 361 init_msix_table(struct vmctx *ctx, struct passthru_softc *sc, uint64_t base) in init_msix_table() 440 cfginitbar(struct vmctx *ctx, struct passthru_softc *sc) in cfginitbar() 524 cfginit(struct vmctx *ctx, struct pci_devinst *pi, int bus, int slot, int func) in cfginit() 549 passthru_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) in passthru_init() 636 passthru_cfgread(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, in passthru_cfgread() 667 passthru_cfgwrite(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, in passthru_cfgwrite() 738 passthru_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, in passthru_write() 761 passthru_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, in passthru_read()
|
| HD | pci_hostbridge.c | 35 pci_hostbridge_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) in pci_hostbridge_init() 51 pci_amd_hostbridge_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) in pci_amd_hostbridge_init()
|
| HD | atkbdc.c | 51 atkbdc_data_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, in atkbdc_data_handler() 63 atkbdc_sts_ctl_handler(struct vmctx *ctx, int vcpu, int in, int port, in atkbdc_sts_ctl_handler()
|
| HD | virtio.h | 281 struct vmctx; 460 uint64_t vi_pci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, 462 void vi_pci_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi,
|
| HD | spinup_ap.c | 46 spinup_ap_realmode(struct vmctx *ctx, int newcpu, uint64_t *rip) in spinup_ap_realmode() 78 spinup_ap(struct vmctx *ctx, int vcpu, int newcpu, uint64_t rip) in spinup_ap()
|
| HD | rtc.c | 60 rtc_time(struct vmctx *ctx, int use_localtime) in rtc_time() 74 rtc_init(struct vmctx *ctx, int use_localtime) in rtc_init()
|
| HD | xmsr.c | 49 emulate_wrmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t val) in emulate_wrmsr() 102 emulate_rdmsr(struct vmctx *ctx, int vcpu, uint32_t num, uint64_t *val) in emulate_rdmsr()
|
| HD | pci_irq.c | 97 pirq_write(struct vmctx *ctx, int pin, uint8_t val) in pirq_write() 135 pci_irq_init(struct vmctx *ctx) in pci_irq_init() 196 pirq_alloc_pin(struct vmctx *ctx) in pirq_alloc_pin()
|