Lines Matching refs:vcpu
512 vm_set_desc(struct vmctx *ctx, int vcpu, int reg, in vm_set_desc() argument
519 vmsegdesc.cpuid = vcpu; in vm_set_desc()
530 vm_get_desc(struct vmctx *ctx, int vcpu, int reg, in vm_get_desc() argument
537 vmsegdesc.cpuid = vcpu; in vm_get_desc()
550 vm_get_seg_desc(struct vmctx *ctx, int vcpu, int reg, struct seg_desc *seg_desc) in vm_get_seg_desc() argument
554 error = vm_get_desc(ctx, vcpu, reg, &seg_desc->base, &seg_desc->limit, in vm_get_seg_desc()
560 vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val) in vm_set_register() argument
566 vmreg.cpuid = vcpu; in vm_set_register()
575 vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *ret_val) in vm_get_register() argument
581 vmreg.cpuid = vcpu; in vm_get_register()
590 vm_set_register_set(struct vmctx *ctx, int vcpu, unsigned int count, in vm_set_register_set() argument
597 vmregset.cpuid = vcpu; in vm_set_register_set()
607 vm_get_register_set(struct vmctx *ctx, int vcpu, unsigned int count, in vm_get_register_set() argument
614 vmregset.cpuid = vcpu; in vm_get_register_set()
624 vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit) in vm_run() argument
630 vmrun.cpuid = vcpu; in vm_run()
655 vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, int errcode_valid, in vm_inject_exception() argument
660 exc.cpuid = vcpu; in vm_inject_exception()
680 vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector) in vm_lapic_irq() argument
685 vmirq.cpuid = vcpu; in vm_lapic_irq()
692 vm_lapic_local_irq(struct vmctx *ctx, int vcpu, int vector) in vm_lapic_local_irq() argument
697 vmirq.cpuid = vcpu; in vm_lapic_local_irq()
805 vm_inject_nmi(struct vmctx *ctx, int vcpu) in vm_inject_nmi() argument
810 vmnmi.cpuid = vcpu; in vm_inject_nmi()
854 vm_get_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, in vm_get_capability() argument
861 vmcap.cpuid = vcpu; in vm_get_capability()
870 vm_set_capability(struct vmctx *ctx, int vcpu, enum vm_cap_type cap, int val) in vm_set_capability() argument
875 vmcap.cpuid = vcpu; in vm_set_capability()
926 vm_setup_pptdev_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func, in vm_setup_pptdev_msi() argument
932 pptmsi.vcpu = vcpu; in vm_setup_pptdev_msi()
944 vm_setup_pptdev_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func, in vm_setup_pptdev_msix() argument
950 pptmsix.vcpu = vcpu; in vm_setup_pptdev_msix()
963 vm_get_stats(struct vmctx *ctx, int vcpu, struct timeval *ret_tv, in vm_get_stats() argument
970 vmstats.cpuid = vcpu; in vm_get_stats()
996 vm_get_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state *state) in vm_get_x2apic_state() argument
1002 x2apic.cpuid = vcpu; in vm_get_x2apic_state()
1010 vm_set_x2apic_state(struct vmctx *ctx, int vcpu, enum x2apic_state state) in vm_set_x2apic_state() argument
1016 x2apic.cpuid = vcpu; in vm_set_x2apic_state()
1029 vcpu_reset(struct vmctx *vmctx, int vcpu) in vcpu_reset() argument
1039 error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RFLAGS, rflags); in vcpu_reset()
1044 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RIP, rip)) != 0) in vcpu_reset()
1048 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR0, cr0)) != 0) in vcpu_reset()
1051 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR3, zero)) != 0) in vcpu_reset()
1055 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CR4, cr4)) != 0) in vcpu_reset()
1064 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_CS, in vcpu_reset()
1070 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_CS, sel)) != 0) in vcpu_reset()
1079 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_SS, in vcpu_reset()
1084 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_DS, in vcpu_reset()
1089 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_ES, in vcpu_reset()
1094 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_FS, in vcpu_reset()
1099 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GS, in vcpu_reset()
1105 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_SS, sel)) != 0) in vcpu_reset()
1107 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_DS, sel)) != 0) in vcpu_reset()
1109 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_ES, sel)) != 0) in vcpu_reset()
1111 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_FS, sel)) != 0) in vcpu_reset()
1113 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_GS, sel)) != 0) in vcpu_reset()
1118 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RAX, zero)) != 0) in vcpu_reset()
1120 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RBX, zero)) != 0) in vcpu_reset()
1122 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RCX, zero)) != 0) in vcpu_reset()
1124 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RDX, rdx)) != 0) in vcpu_reset()
1126 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RSI, zero)) != 0) in vcpu_reset()
1128 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RDI, zero)) != 0) in vcpu_reset()
1130 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RBP, zero)) != 0) in vcpu_reset()
1132 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_RSP, zero)) != 0) in vcpu_reset()
1139 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_GDTR, in vcpu_reset()
1144 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_IDTR, in vcpu_reset()
1153 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_TR, 0, 0, desc_access); in vcpu_reset()
1158 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_TR, sel)) != 0) in vcpu_reset()
1165 error = vm_set_desc(vmctx, vcpu, VM_REG_GUEST_LDTR, desc_base, in vcpu_reset()
1171 if ((error = vm_set_register(vmctx, vcpu, VM_REG_GUEST_LDTR, 0)) != 0) in vcpu_reset()
1215 vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_gla2gpa() argument
1222 gg.vcpuid = vcpu; in vm_gla2gpa()
1236 vm_gla2gpa_nofault(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_gla2gpa_nofault() argument
1243 gg.vcpuid = vcpu; in vm_gla2gpa_nofault()
1261 vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, in vm_copy_setup() argument
1276 error = vm_gla2gpa(ctx, vcpu, paging, gla, prot, &gpa, fault); in vm_copy_setup()
1299 vm_copy_teardown(struct vmctx *ctx, int vcpu, struct iovec *iov, int iovcnt) in vm_copy_teardown() argument
1306 vm_copyin(struct vmctx *ctx, int vcpu, struct iovec *iov, void *vp, size_t len) in vm_copyin() argument
1326 vm_copyout(struct vmctx *ctx, int vcpu, const void *vp, struct iovec *iov, in vm_copyout() argument
1383 vm_activate_cpu(struct vmctx *ctx, int vcpu) in vm_activate_cpu() argument
1389 ac.vcpuid = vcpu; in vm_activate_cpu()
1395 vm_suspend_cpu(struct vmctx *ctx, int vcpu) in vm_suspend_cpu() argument
1401 ac.vcpuid = vcpu; in vm_suspend_cpu()
1407 vm_resume_cpu(struct vmctx *ctx, int vcpu) in vm_resume_cpu() argument
1413 ac.vcpuid = vcpu; in vm_resume_cpu()
1419 vm_get_intinfo(struct vmctx *ctx, int vcpu, uint64_t *info1, uint64_t *info2) in vm_get_intinfo() argument
1425 vmii.vcpuid = vcpu; in vm_get_intinfo()
1435 vm_set_intinfo(struct vmctx *ctx, int vcpu, uint64_t info1) in vm_set_intinfo() argument
1441 vmii.vcpuid = vcpu; in vm_set_intinfo()
1500 vm_restart_instruction(void *arg, int vcpu) in vm_restart_instruction() argument
1504 return (ioctl(ctx->fd, VM_RESTART_INSTRUCTION, &vcpu)); in vm_restart_instruction()