Deleted Added
full compact
vmcb.h (270511) vmcb.h (270962)
1/*-
2 * Copyright (c) 2013 Anish Gupta (akgupt3@gmail.com)
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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2013 Anish Gupta (akgupt3@gmail.com)
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 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: projects/bhyve_svm/sys/amd64/vmm/amd/vmcb.h 270511 2014-08-25 00:58:20Z neel $
26 * $FreeBSD: projects/bhyve_svm/sys/amd64/vmm/amd/vmcb.h 270962 2014-09-02 04:22:42Z neel $
27 */
28
29#ifndef _VMCB_H_
30#define _VMCB_H_
31
32/*
33 * Secure Virtual Machine: AMD64 Programmer's Manual Vol2, Chapter 15
34 * Layout of VMCB: AMD64 Programmer's Manual Vol2, Appendix B

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

158struct vmcb_segment {
159 uint16_t selector;
160 uint16_t attrib;
161 uint32_t limit;
162 uint64_t base;
163} __attribute__ ((__packed__));
164CTASSERT(sizeof(struct vmcb_segment) == 16);
165
27 */
28
29#ifndef _VMCB_H_
30#define _VMCB_H_
31
32/*
33 * Secure Virtual Machine: AMD64 Programmer's Manual Vol2, Chapter 15
34 * Layout of VMCB: AMD64 Programmer's Manual Vol2, Appendix B

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

158struct vmcb_segment {
159 uint16_t selector;
160 uint16_t attrib;
161 uint32_t limit;
162 uint64_t base;
163} __attribute__ ((__packed__));
164CTASSERT(sizeof(struct vmcb_segment) == 16);
165
166/* Code segment descriptor attribute in 12 bit format as saved by VMCB. */
167#define VMCB_CS_ATTRIB_L BIT(9) /* Long mode. */
168#define VMCB_CS_ATTRIB_D BIT(10) /* OPerand size bit. */
169
166/*
167 * The VMCB is divided into two areas - the first one contains various
168 * control bits including the intercept vector and the second one contains
169 * the guest state.
170 */
171
172/* VMCB control area - padded up to 1024 bytes */
173struct vmcb_ctrl {

--- 112 unchanged lines hidden ---
170/*
171 * The VMCB is divided into two areas - the first one contains various
172 * control bits including the intercept vector and the second one contains
173 * the guest state.
174 */
175
176/* VMCB control area - padded up to 1024 bytes */
177struct vmcb_ctrl {

--- 112 unchanged lines hidden ---