Lines Matching refs:vcpu
574 vm_set_desc(struct vmctx *ctx, int vcpu, int reg, in vm_set_desc() argument
581 vmsegdesc.cpuid = vcpu; in vm_set_desc()
592 vm_get_desc(struct vmctx *ctx, int vcpu, int reg, in vm_get_desc() argument
599 vmsegdesc.cpuid = vcpu; 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() argument
616 error = vm_get_desc(ctx, vcpu, reg, &seg_desc->base, &seg_desc->limit, in vm_get_seg_desc()
622 vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val) in vm_set_register() argument
628 vmreg.cpuid = vcpu; in vm_set_register()
637 vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *ret_val) in vm_get_register() argument
643 vmreg.cpuid = vcpu; in vm_get_register()
652 vm_set_register_set(struct vmctx *ctx, int vcpu, unsigned int count, in vm_set_register_set() argument
659 vmregset.cpuid = vcpu; in vm_set_register_set()
669 vm_get_register_set(struct vmctx *ctx, int vcpu, unsigned int count, in vm_get_register_set() argument
676 vmregset.cpuid = vcpu; in vm_get_register_set()
686 vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit) in vm_run() argument
692 vmrun.cpuid = vcpu; in vm_run()
717 vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, int errcode_valid, in vm_inject_exception() argument
722 exc.cpuid = vcpu; in vm_inject_exception()
742 vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector) in vm_lapic_irq() argument
747 vmirq.cpuid = vcpu; in vm_lapic_irq()
754 vm_lapic_local_irq(struct vmctx *ctx, int vcpu, int vector) in vm_lapic_local_irq() argument
759 vmirq.cpuid = vcpu; in vm_lapic_local_irq()
818 vm_readwrite_kernemu_device(struct vmctx *ctx, int vcpu, vm_paddr_t gpa, in vm_readwrite_kernemu_device() argument
822 .vcpuid = vcpu, in vm_readwrite_kernemu_device()
886 vm_inject_nmi(struct vmctx *ctx, int vcpu) in vm_inject_nmi() argument
891 vmnmi.cpuid = vcpu; in vm_inject_nmi()
928 vm_get_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, in vm_get_capability() argument
935 vmcap.cpuid = vcpu; in vm_get_capability()
944 vm_set_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, int val) in vm_set_capability() argument
949 vmcap.cpuid = vcpu; in vm_set_capability()
1016 vm_setup_pptdev_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func, in vm_setup_pptdev_msi() argument
1022 pptmsi.vcpu = vcpu; 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() argument
1040 pptmsix.vcpu = vcpu; in vm_setup_pptdev_msix()
1066 vm_get_stats(struct vmctx *ctx, int vcpu, struct timeval *ret_tv, in vm_get_stats() argument
1073 vmstats.cpuid = vcpu; in vm_get_stats()
1099 vm_get_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state *state) in vm_get_x2apic_state() argument
1105 x2apic.cpuid = vcpu; in vm_get_x2apic_state()
1113 vm_set_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state state) in vm_set_x2apic_state() argument
1119 x2apic.cpuid = vcpu; 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()
1318 vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_gla2gpa() argument
1325 gg.vcpuid = vcpu; in vm_gla2gpa()
1339 vm_gla2gpa_nofault(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_gla2gpa_nofault() argument
1346 gg.vcpuid = vcpu; in vm_gla2gpa_nofault()
1364 vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_copy_setup() argument
1379 error = vm_gla2gpa(ctx, vcpu, paging, gla, prot, &gpa, fault); 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()
1486 vm_activate_cpu(struct vmctx *ctx, int vcpu) in vm_activate_cpu() argument
1492 ac.vcpuid = vcpu; in vm_activate_cpu()
1498 vm_suspend_cpu(struct vmctx *ctx, int vcpu) in vm_suspend_cpu() argument
1504 ac.vcpuid = vcpu; in vm_suspend_cpu()
1510 vm_resume_cpu(struct vmctx *ctx, int vcpu) in vm_resume_cpu() argument
1516 ac.vcpuid = vcpu; in vm_resume_cpu()
1522 vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *info1, uint64_t *info2) in vm_get_intinfo() argument
1528 vmii.vcpuid = vcpu; in vm_get_intinfo()
1538 vm_set_intinfo(struct vmctx *ctx, int vcpu, uint64_t info1) in vm_set_intinfo() argument
1544 vmii.vcpuid = vcpu; in vm_set_intinfo()
1603 vm_restart_instruction(void *arg, int vcpu) in vm_restart_instruction() argument
1607 return (ioctl(ctx->fd, VM_RESTART_INSTRUCTION, &vcpu)); in vm_restart_instruction()