blob: f467e7b1cab07c3f3cb12d47f4a66abd7971ebbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
* http://www.illumos.org/license/CDDL.
*/
/* This file is dual-licensed; see usr/src/contrib/bhyve/LICENSE */
/*
* Copyright 2014 Pluribus Networks Inc.
*/
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/cpuvar.h>
#include <machine/vmm.h>
#include <sys/vmm_vm.h>
#include "intel/vmx.h"
vmxctx
guest_rdi VMXCTX_GUEST_RDI
guest_rsi VMXCTX_GUEST_RSI
guest_rdx VMXCTX_GUEST_RDX
guest_rcx VMXCTX_GUEST_RCX
guest_r8 VMXCTX_GUEST_R8
guest_r9 VMXCTX_GUEST_R9
guest_rax VMXCTX_GUEST_RAX
guest_rbx VMXCTX_GUEST_RBX
guest_rbp VMXCTX_GUEST_RBP
guest_r10 VMXCTX_GUEST_R10
guest_r11 VMXCTX_GUEST_R11
guest_r12 VMXCTX_GUEST_R12
guest_r13 VMXCTX_GUEST_R13
guest_r14 VMXCTX_GUEST_R14
guest_r15 VMXCTX_GUEST_R15
guest_cr2 VMXCTX_GUEST_CR2
inst_fail_status VMXCTX_INST_FAIL_STATUS
\#define VM_SUCCESS 0
\#define VM_FAIL_INVALID 1
\#define VM_FAIL_VALID 2
\#define VMX_GUEST_VMEXIT 0
\#define VMX_VMRESUME_ERROR 1
\#define VMX_VMLAUNCH_ERROR 2
\#define VMX_INVEPT_ERROR 3
\#define VMX_VMWRITE_ERROR 4
|