L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
__vm-svm.h
1
6/*
7 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
8 * Alexander Warg <warg@os.inf.tu-dresden.de>
9 * economic rights: Technische Universität Dresden (Germany)
10 *
11 * This file is part of TUD:OS and distributed under the terms of the
12 * GNU General Public License 2.
13 * Please see the COPYING-GPL-2 file for details.
14 *
15 * As a special exception, you may use this file as part of a free software
16 * library without restriction. Specifically, if other files instantiate
17 * templates or use macros or inline functions from this file, or you compile
18 * this file and link it with other files to produce an executable, this
19 * file does not by itself cause the resulting executable to be covered by
20 * the GNU General Public License. This exception does not however
21 * invalidate any other reasons why the executable file might be covered by
22 * the GNU General Public License.
23 */
24#pragma once
25
26#include <l4/sys/types.h>
27
40{
41 l4_uint16_t intercept_rd_crX;
42 l4_uint16_t intercept_wr_crX;
43
44 l4_uint16_t intercept_rd_drX;
45 l4_uint16_t intercept_wr_drX;
46
47 l4_uint32_t intercept_exceptions;
48
49 l4_uint32_t intercept_instruction0;
50 l4_uint32_t intercept_instruction1;
51
52 l4_uint8_t _reserved0[40];
53
54 l4_uint16_t pause_filter_threshold;
55 l4_uint16_t pause_filter_count;
56
57 l4_uint64_t iopm_base_pa;
58 l4_uint64_t msrpm_base_pa;
59 l4_uint64_t tsc_offset;
60 l4_uint64_t guest_asid_tlb_ctl;
61 l4_uint64_t interrupt_ctl;
62 l4_uint64_t interrupt_shadow;
63 l4_uint64_t exitcode;
64 l4_uint64_t exitinfo1;
65 l4_uint64_t exitinfo2;
66 l4_uint64_t exitintinfo;
67 l4_uint64_t np_enable;
68
69 l4_uint8_t _reserved1[16];
70
71 l4_uint64_t eventinj;
72 l4_uint64_t n_cr3;
73 l4_uint64_t lbr_virtualization_enable;
74 l4_uint64_t clean_bits;
75 l4_uint64_t n_rip;
76
77 l4_uint8_t _reserved2[816];
78} __attribute__((packed)) l4_vm_svm_vmcb_control_area_t;
79
85{
86 l4_uint16_t selector;
87 l4_uint16_t attrib;
88 l4_uint32_t limit;
89 l4_uint64_t base;
90} __attribute__((packed)) l4_vm_svm_vmcb_state_save_area_seg_t;
91
97{
108
109 l4_uint8_t _reserved0[43];
110
111 l4_uint8_t cpl;
112
113 l4_uint32_t _reserved1;
114
115 l4_uint64_t efer;
116
117 l4_uint8_t _reserved2[112];
118
119 l4_uint64_t cr4;
120 l4_uint64_t cr3;
121 l4_uint64_t cr0;
122 l4_uint64_t dr7;
123 l4_uint64_t dr6;
124 l4_uint64_t rflags;
125 l4_uint64_t rip;
126
127 l4_uint8_t _reserved3[88];
128
129 l4_uint64_t rsp;
130
131 l4_uint8_t _reserved4[24];
132
133 l4_uint64_t rax;
134 l4_uint64_t star;
135 l4_uint64_t lstar;
136 l4_uint64_t cstar;
137 l4_uint64_t sfmask;
138 l4_uint64_t kernelgsbase;
139 l4_uint64_t sysenter_cs;
140 l4_uint64_t sysenter_esp;
141 l4_uint64_t sysenter_eip;
142 l4_uint64_t cr2;
143
144 l4_uint8_t _reserved5[32];
145
146 l4_uint64_t g_pat;
147 l4_uint64_t dbgctl;
148 l4_uint64_t br_from;
149 l4_uint64_t br_to;
150 l4_uint64_t lastexcpfrom;
151 l4_uint64_t last_excpto;
152
153 // this field is _NOT_ part of the official VMCB specification
154 // a (userlevel) VMM needs this for proper FPU state virtualization
155 l4_uint64_t xcr0;
156
157 l4_uint8_t _reserved6[2400];
158} __attribute__((packed)) l4_vm_svm_vmcb_state_save_area_t;
159
160
unsigned char l4_uint8_t
Unsigned 8bit value.
Definition l4int.h:36
unsigned int l4_uint32_t
Unsigned 32bit value.
Definition l4int.h:40
unsigned short int l4_uint16_t
Unsigned 16bit value.
Definition l4int.h:38
unsigned long long l4_uint64_t
Unsigned 64bit value.
Definition l4int.h:42
struct l4_vm_svm_vmcb_state_save_area_seg l4_vm_svm_vmcb_state_save_area_seg_t
State save area segment selector struct.
struct l4_vm_svm_vmcb_state_save_area l4_vm_svm_vmcb_state_save_area_t
State save area structure for SVM VMs.
struct l4_vm_svm_vmcb_control_area l4_vm_svm_vmcb_control_area_t
VMCB structure for SVM VMs.
Common L4 ABI Data Types.
VMCB structure for SVM VMs.
Definition __vm-svm.h:40
State save area segment selector struct.
Definition __vm-svm.h:85
State save area structure for SVM VMs.
Definition __vm-svm.h:97
Control structure for SVM VMs.
Definition __vm-svm.h:166