summaryrefslogtreecommitdiff
path: root/kvm_x86host.h
diff options
context:
space:
mode:
authormax <max@maxpad.(none)>2010-12-21 16:40:44 +0100
committermax <max@maxpad.(none)>2010-12-21 16:40:44 +0100
commitc8e2e3d1ec0e7b7fc3dcf4e23aa320c8b628e79a (patch)
tree409179b4e6b47632935744c7cae6a450a8e134ef /kvm_x86host.h
parent20f1d9adf1addcc1497e84d3c8413eebaed6ba72 (diff)
downloadillumos-kvm-c8e2e3d1ec0e7b7fc3dcf4e23aa320c8b628e79a.tar.gz
bug fixes. fixup_rmode_irq unresolved.
Diffstat (limited to 'kvm_x86host.h')
-rw-r--r--kvm_x86host.h40
1 files changed, 36 insertions, 4 deletions
diff --git a/kvm_x86host.h b/kvm_x86host.h
index b303d68..fe4d719 100644
--- a/kvm_x86host.h
+++ b/kvm_x86host.h
@@ -322,6 +322,41 @@ struct mtrr_state_type {
mtrr_type def_type;
};
+struct i387_fxsave_struct {
+ unsigned short cwd; /* Control Word */
+ unsigned short swd; /* Status Word */
+ unsigned short twd; /* Tag Word */
+ unsigned short fop; /* Last Instruction Opcode */
+ union {
+ struct {
+ uint64_t rip; /* Instruction Pointer */
+ uint64_t rdp; /* Data Pointer */
+ }v1;
+ struct {
+ uint32_t fip; /* FPU IP Offset */
+ uint32_t fcs; /* FPU IP Selector */
+ uint32_t foo; /* FPU Operand Offset */
+ uint32_t fos; /* FPU Operand Selector */
+ }v2;
+ }v12;
+ uint32_t mxcsr; /* MXCSR Register State */
+ uint32_t mxcsr_mask; /* MXCSR Mask */
+
+ /* 8*16 bytes for each FP-reg = 128 bytes: */
+ uint32_t st_space[32];
+
+ /* 16*16 bytes for each XMM-reg = 256 bytes: */
+ uint32_t xmm_space[64];
+
+ uint32_t padding[12];
+
+ union {
+ uint32_t padding1[12];
+ uint32_t sw_reserved[12];
+ }v3;
+
+} __attribute__((aligned(16)));
+
struct kvm_vcpu_arch {
uint64_t host_tsc;
/*
@@ -371,10 +406,8 @@ struct kvm_vcpu_arch {
unsigned long mmu_seq;
} update_pte;
-#ifdef XXX
struct i387_fxsave_struct host_fx_image;
struct i387_fxsave_struct guest_fx_image;
-#endif /*XXX*/
gva_t mmio_fault_cr2;
struct kvm_pio_request pio;
@@ -886,7 +919,6 @@ static inline unsigned long read_msr(unsigned long msr)
}
#endif
-#ifdef XXX
static inline void kvm_fx_save(struct i387_fxsave_struct *image)
{
asm("fxsave (%0)":: "r" (image));
@@ -901,7 +933,7 @@ static inline void kvm_fx_finit(void)
{
asm("finit");
}
-#endif /*XXX*/
+
static inline uint32_t get_rdx_init_val(void)
{
return 0x600; /* P6 family */