Xen Test Framework
hvm_vcpu.h
Go to the documentation of this file.
1/*
2 * Xen public HVM VCPU hypercall interface
3 */
4#ifndef XEN_PUBLIC_HVM_HVM_VCPU_H
5#define XEN_PUBLIC_HVM_HVM_VCPU_H
6
7#include "../xen.h"
8
20
24
26
27 /*
28 * EFER should only be used to set the NXE bit (if required)
29 * when starting a vCPU in 32bit mode with paging enabled or
30 * to set the LME/LMA bits in order to start the vCPU in
31 * compatibility mode.
32 */
34
50
52};
53
54/*
55 * The layout of the _ar fields of the segment registers is the
56 * following:
57 *
58 * Bits [0,3]: type (bits 40-43).
59 * Bit 4: s (descriptor type, bit 44).
60 * Bit [5,6]: dpl (descriptor privilege level, bits 45-46).
61 * Bit 7: p (segment-present, bit 47).
62 * Bit 8: avl (available for system software, bit 52).
63 * Bit 9: l (64-bit code segment, bit 53).
64 * Bit 10: db (meaning depends on the segment, bit 54).
65 * Bit 11: g (granularity, bit 55)
66 * Bits [12,15]: unused, must be blank.
67 *
68 * A more complete description of the meaning of this fields can be
69 * obtained from the Intel SDM, Volume 3, section 3.4.5.
70 */
71
83
88
89 /*
90 * Using VCPU_HVM_MODE_64B implies that the vCPU is launched
91 * directly in long mode, so the cached parts of the segment
92 * registers get set to match that environment.
93 *
94 * If the user wants to launch the vCPU in compatibility mode
95 * the 32-bit structure should be used instead.
96 */
97};
98
100#define VCPU_HVM_MODE_32B 0 /* 32bit fields of the structure will be used. */
101#define VCPU_HVM_MODE_64B 1 /* 64bit fields of the structure will be used. */
103
105
106 /* CPU registers. */
107 union {
111};
112
113#endif /* XEN_PUBLIC_HVM_HVM_VCPU_H */
114
115/*
116 * Local variables:
117 * mode: C
118 * c-file-style: "BSD"
119 * c-basic-offset: 4
120 * tab-width: 4
121 * indent-tabs-mode: nil
122 * End:
123 */
__UINT32_TYPE__ uint32_t
Definition: stdint.h:16
__UINT64_TYPE__ uint64_t
Definition: stdint.h:17
__UINT16_TYPE__ uint16_t
Definition: stdint.h:15
union xen_vcpu_hvm_context::@41 cpu_regs
struct xen_vcpu_hvm_x86_64 x86_64
Definition: hvm_vcpu.h:109
struct xen_vcpu_hvm_x86_32 x86_32
Definition: hvm_vcpu.h:108
uint32_t cs_base
Definition: hvm_vcpu.h:35
uint16_t ds_ar
Definition: hvm_vcpu.h:46
uint32_t ds_limit
Definition: hvm_vcpu.h:41
uint32_t ss_base
Definition: hvm_vcpu.h:37
uint16_t es_ar
Definition: hvm_vcpu.h:48
uint16_t pad2[3]
Definition: hvm_vcpu.h:51
uint32_t tr_base
Definition: hvm_vcpu.h:39
uint16_t tr_ar
Definition: hvm_vcpu.h:49
uint32_t ds_base
Definition: hvm_vcpu.h:36
uint16_t cs_ar
Definition: hvm_vcpu.h:45
uint32_t es_base
Definition: hvm_vcpu.h:38
uint32_t ss_limit
Definition: hvm_vcpu.h:42
uint32_t tr_limit
Definition: hvm_vcpu.h:44
uint32_t eflags
Definition: hvm_vcpu.h:19
uint32_t cs_limit
Definition: hvm_vcpu.h:40
uint32_t es_limit
Definition: hvm_vcpu.h:43
uint16_t ss_ar
Definition: hvm_vcpu.h:47
uint64_t rflags
Definition: hvm_vcpu.h:82