Deleted Added
full compact
vmx.h (266339) vmx.h (268953)
1/*-
2 * Copyright (c) 2011 NetApp, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2011 NetApp, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: stable/10/sys/amd64/vmm/intel/vmx.h 266339 2014-05-17 19:11:08Z jhb $
26 * $FreeBSD: stable/10/sys/amd64/vmm/intel/vmx.h 268953 2014-07-21 19:08:02Z jhb $
27 */
28
29#ifndef _VMX_H_
30#define _VMX_H_
31
32#include "vmcs.h"
33
34struct pmap;

--- 20 unchanged lines hidden (view full) ---

55
56 register_t host_r15; /* Host state */
57 register_t host_r14;
58 register_t host_r13;
59 register_t host_r12;
60 register_t host_rbp;
61 register_t host_rsp;
62 register_t host_rbx;
27 */
28
29#ifndef _VMX_H_
30#define _VMX_H_
31
32#include "vmcs.h"
33
34struct pmap;

--- 20 unchanged lines hidden (view full) ---

55
56 register_t host_r15; /* Host state */
57 register_t host_r14;
58 register_t host_r13;
59 register_t host_r12;
60 register_t host_rbp;
61 register_t host_rsp;
62 register_t host_rbx;
63 register_t host_rip;
64 /*
65 * XXX todo debug registers and fpu state
66 */
67
68 int inst_fail_status;
69
70 /*
63 /*
64 * XXX todo debug registers and fpu state
65 */
66
67 int inst_fail_status;
68
69 /*
71 * The pmap needs to be deactivated in vmx_exit_guest()
70 * The pmap needs to be deactivated in vmx_enter_guest()
72 * so keep a copy of the 'pmap' in each vmxctx.
73 */
74 struct pmap *pmap;
75};
76
77struct vmxcap {
78 int set;
79 uint32_t proc_ctls;

--- 37 unchanged lines hidden (view full) ---

117CTASSERT((offsetof(struct vmx, guest_msrs) & 15) == 0);
118CTASSERT((offsetof(struct vmx, pir_desc[0]) & 63) == 0);
119
120#define VMX_GUEST_VMEXIT 0
121#define VMX_VMRESUME_ERROR 1
122#define VMX_VMLAUNCH_ERROR 2
123#define VMX_INVEPT_ERROR 3
124int vmx_enter_guest(struct vmxctx *ctx, struct vmx *vmx, int launched);
71 * so keep a copy of the 'pmap' in each vmxctx.
72 */
73 struct pmap *pmap;
74};
75
76struct vmxcap {
77 int set;
78 uint32_t proc_ctls;

--- 37 unchanged lines hidden (view full) ---

116CTASSERT((offsetof(struct vmx, guest_msrs) & 15) == 0);
117CTASSERT((offsetof(struct vmx, pir_desc[0]) & 63) == 0);
118
119#define VMX_GUEST_VMEXIT 0
120#define VMX_VMRESUME_ERROR 1
121#define VMX_VMLAUNCH_ERROR 2
122#define VMX_INVEPT_ERROR 3
123int vmx_enter_guest(struct vmxctx *ctx, struct vmx *vmx, int launched);
125void vmx_exit_guest(void);
126void vmx_call_isr(uintptr_t entry);
127
128u_long vmx_fix_cr0(u_long cr0);
129u_long vmx_fix_cr4(u_long cr4);
130
124void vmx_call_isr(uintptr_t entry);
125
126u_long vmx_fix_cr0(u_long cr0);
127u_long vmx_fix_cr4(u_long cr4);
128
129extern char vmx_exit_guest[];
130
131#endif
131#endif