Changeset View
Changeset View
Standalone View
Standalone View
sys/xen/interface/hvm/hvm_vcpu.h
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | struct vcpu_hvm_x86_32 { | ||||
uint16_t cs_ar; | uint16_t cs_ar; | ||||
uint16_t ds_ar; | uint16_t ds_ar; | ||||
uint16_t ss_ar; | uint16_t ss_ar; | ||||
uint16_t es_ar; | uint16_t es_ar; | ||||
uint16_t tr_ar; | uint16_t tr_ar; | ||||
uint16_t pad2[3]; | uint16_t pad2[3]; | ||||
}; | }; | ||||
typedef struct vcpu_hvm_x86_32 xen_vcpu_hvm_x86_32_t; | |||||
/* | /* | ||||
* The layout of the _ar fields of the segment registers is the | * The layout of the _ar fields of the segment registers is the | ||||
* following: | * following: | ||||
* | * | ||||
* Bits [0,3]: type (bits 40-43). | * Bits [0,3]: type (bits 40-43). | ||||
* Bit 4: s (descriptor type, bit 44). | * Bit 4: s (descriptor type, bit 44). | ||||
* Bit [5,6]: dpl (descriptor privilege level, bits 45-46). | * Bit [5,6]: dpl (descriptor privilege level, bits 45-46). | ||||
Show All 29 Lines | struct vcpu_hvm_x86_64 { | ||||
* Using VCPU_HVM_MODE_64B implies that the vCPU is launched | * Using VCPU_HVM_MODE_64B implies that the vCPU is launched | ||||
* directly in long mode, so the cached parts of the segment | * directly in long mode, so the cached parts of the segment | ||||
* registers get set to match that environment. | * registers get set to match that environment. | ||||
* | * | ||||
* If the user wants to launch the vCPU in compatibility mode | * If the user wants to launch the vCPU in compatibility mode | ||||
* the 32-bit structure should be used instead. | * the 32-bit structure should be used instead. | ||||
*/ | */ | ||||
}; | }; | ||||
typedef struct vcpu_hvm_x86_64 xen_vcpu_hvm_x86_64_t; | |||||
struct vcpu_hvm_context { | struct vcpu_hvm_context { | ||||
#define VCPU_HVM_MODE_32B 0 /* 32bit fields of the structure will be used. */ | #define VCPU_HVM_MODE_32B 0 /* 32bit fields of the structure will be used. */ | ||||
#define VCPU_HVM_MODE_64B 1 /* 64bit fields of the structure will be used. */ | #define VCPU_HVM_MODE_64B 1 /* 64bit fields of the structure will be used. */ | ||||
uint32_t mode; | uint32_t mode; | ||||
uint32_t pad; | uint32_t pad; | ||||
/* CPU registers. */ | /* CPU registers. */ | ||||
union { | union { | ||||
struct vcpu_hvm_x86_32 x86_32; | xen_vcpu_hvm_x86_32_t x86_32; | ||||
struct vcpu_hvm_x86_64 x86_64; | xen_vcpu_hvm_x86_64_t x86_64; | ||||
} cpu_regs; | } cpu_regs; | ||||
}; | }; | ||||
typedef struct vcpu_hvm_context vcpu_hvm_context_t; | typedef struct vcpu_hvm_context vcpu_hvm_context_t; | ||||
DEFINE_XEN_GUEST_HANDLE(vcpu_hvm_context_t); | DEFINE_XEN_GUEST_HANDLE(vcpu_hvm_context_t); | ||||
#endif /* __XEN_PUBLIC_HVM_HVM_VCPU_H__ */ | #endif /* __XEN_PUBLIC_HVM_HVM_VCPU_H__ */ | ||||
/* | /* | ||||
* Local variables: | * Local variables: | ||||
* mode: C | * mode: C | ||||
* c-file-style: "BSD" | * c-file-style: "BSD" | ||||
* c-basic-offset: 4 | * c-basic-offset: 4 | ||||
* tab-width: 4 | * tab-width: 4 | ||||
* indent-tabs-mode: nil | * indent-tabs-mode: nil | ||||
* End: | * End: | ||||
*/ | */ |