Lines Matching full:vcpu

97 vm_set_desc(struct vcpu *vcpu, int reg,  in vm_set_desc()  argument
109 error = vcpu_ioctl(vcpu, VM_SET_SEGMENT_DESCRIPTOR, &vmsegdesc); in vm_set_desc()
114 vm_get_desc(struct vcpu *vcpu, int reg, uint64_t *base, uint32_t *limit, in vm_get_desc() argument
123 error = vcpu_ioctl(vcpu, VM_GET_SEGMENT_DESCRIPTOR, &vmsegdesc); in vm_get_desc()
133 vm_get_seg_desc(struct vcpu *vcpu, int reg, struct seg_desc *seg_desc) in vm_get_seg_desc() argument
137 error = vm_get_desc(vcpu, reg, &seg_desc->base, &seg_desc->limit, in vm_get_seg_desc()
143 vm_lapic_irq(struct vcpu *vcpu, int vector) in vm_lapic_irq() argument
150 return (vcpu_ioctl(vcpu, VM_LAPIC_IRQ, &vmirq)); in vm_lapic_irq()
154 vm_lapic_local_irq(struct vcpu *vcpu, int vector) in vm_lapic_local_irq() argument
161 return (vcpu_ioctl(vcpu, VM_LAPIC_LOCAL_IRQ, &vmirq)); in vm_lapic_local_irq()
187 * The apic id associated with the 'vcpu' has the same numerical value in vm_apicid2vcpu()
188 * as the 'vcpu' itself. in vm_apicid2vcpu()
283 vm_inject_nmi(struct vcpu *vcpu) in vm_inject_nmi() argument
289 return (vcpu_ioctl(vcpu, VM_INJECT_NMI, &vmnmi)); in vm_inject_nmi()
293 vm_inject_exception(struct vcpu *vcpu, int vector, int errcode_valid, in vm_inject_exception() argument
303 return (vcpu_ioctl(vcpu, VM_INJECT_EXCEPTION, &exc)); in vm_inject_exception()
307 vm_readwrite_kernemu_device(struct vcpu *vcpu, vm_paddr_t gpa, in vm_readwrite_kernemu_device() argument
318 rc = vcpu_ioctl(vcpu, cmd, &irp); in vm_readwrite_kernemu_device()
325 vm_get_x2apic_state(struct vcpu *vcpu, enum x2apic_state *state) in vm_get_x2apic_state() argument
332 error = vcpu_ioctl(vcpu, VM_GET_X2APIC_STATE, &x2apic); in vm_get_x2apic_state()
338 vm_set_x2apic_state(struct vcpu *vcpu, enum x2apic_state state) in vm_set_x2apic_state() argument
346 error = vcpu_ioctl(vcpu, VM_SET_X2APIC_STATE, &x2apic); in vm_set_x2apic_state()
421 vcpu_reset(struct vcpu *vcpu) in vcpu_reset() argument
431 error = vm_set_register(vcpu, VM_REG_GUEST_RFLAGS, rflags); in vcpu_reset()
436 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RIP, rip)) != 0) in vcpu_reset()
445 if ((error = vm_set_register(vcpu, VM_REG_GUEST_CR0, cr0)) != 0) in vcpu_reset()
448 if ((error = vm_set_register(vcpu, VM_REG_GUEST_CR2, zero)) != 0) in vcpu_reset()
451 if ((error = vm_set_register(vcpu, VM_REG_GUEST_CR3, zero)) != 0) in vcpu_reset()
455 if ((error = vm_set_register(vcpu, VM_REG_GUEST_CR4, cr4)) != 0) in vcpu_reset()
464 error = vm_set_desc(vcpu, VM_REG_GUEST_CS, in vcpu_reset()
470 if ((error = vm_set_register(vcpu, VM_REG_GUEST_CS, sel)) != 0) in vcpu_reset()
479 error = vm_set_desc(vcpu, VM_REG_GUEST_SS, in vcpu_reset()
484 error = vm_set_desc(vcpu, VM_REG_GUEST_DS, in vcpu_reset()
489 error = vm_set_desc(vcpu, VM_REG_GUEST_ES, in vcpu_reset()
494 error = vm_set_desc(vcpu, VM_REG_GUEST_FS, in vcpu_reset()
499 error = vm_set_desc(vcpu, VM_REG_GUEST_GS, in vcpu_reset()
505 if ((error = vm_set_register(vcpu, VM_REG_GUEST_SS, sel)) != 0) in vcpu_reset()
507 if ((error = vm_set_register(vcpu, VM_REG_GUEST_DS, sel)) != 0) in vcpu_reset()
509 if ((error = vm_set_register(vcpu, VM_REG_GUEST_ES, sel)) != 0) in vcpu_reset()
511 if ((error = vm_set_register(vcpu, VM_REG_GUEST_FS, sel)) != 0) in vcpu_reset()
513 if ((error = vm_set_register(vcpu, VM_REG_GUEST_GS, sel)) != 0) in vcpu_reset()
516 if ((error = vm_set_register(vcpu, VM_REG_GUEST_EFER, zero)) != 0) in vcpu_reset()
521 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RAX, zero)) != 0) in vcpu_reset()
523 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RBX, zero)) != 0) in vcpu_reset()
525 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RCX, zero)) != 0) in vcpu_reset()
527 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RDX, rdx)) != 0) in vcpu_reset()
529 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RSI, zero)) != 0) in vcpu_reset()
531 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RDI, zero)) != 0) in vcpu_reset()
533 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RBP, zero)) != 0) in vcpu_reset()
535 if ((error = vm_set_register(vcpu, VM_REG_GUEST_RSP, zero)) != 0) in vcpu_reset()
537 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R8, zero)) != 0) in vcpu_reset()
539 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R9, zero)) != 0) in vcpu_reset()
541 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R10, zero)) != 0) in vcpu_reset()
543 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R11, zero)) != 0) in vcpu_reset()
545 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R12, zero)) != 0) in vcpu_reset()
547 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R13, zero)) != 0) in vcpu_reset()
549 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R14, zero)) != 0) in vcpu_reset()
551 if ((error = vm_set_register(vcpu, VM_REG_GUEST_R15, zero)) != 0) in vcpu_reset()
558 error = vm_set_desc(vcpu, VM_REG_GUEST_GDTR, in vcpu_reset()
563 error = vm_set_desc(vcpu, VM_REG_GUEST_IDTR, in vcpu_reset()
572 error = vm_set_desc(vcpu, VM_REG_GUEST_TR, 0, 0, desc_access); in vcpu_reset()
577 if ((error = vm_set_register(vcpu, VM_REG_GUEST_TR, sel)) != 0) in vcpu_reset()
584 error = vm_set_desc(vcpu, VM_REG_GUEST_LDTR, desc_base, in vcpu_reset()
590 if ((error = vm_set_register(vcpu, VM_REG_GUEST_LDTR, 0)) != 0) in vcpu_reset()
593 if ((error = vm_set_register(vcpu, VM_REG_GUEST_DR6, in vcpu_reset()
596 if ((error = vm_set_register(vcpu, VM_REG_GUEST_DR7, 0x400)) != in vcpu_reset()
600 if ((error = vm_set_register(vcpu, VM_REG_GUEST_INTR_SHADOW, in vcpu_reset()