KVM: x86: Use FPU API

Convert KVM to use generic FPU API.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Sheng Yang
2010-05-17 17:08:28 +08:00
committed by Avi Kivity
parent 7cf30855e0
commit 98918833a3
2 changed files with 17 additions and 52 deletions

View File

@@ -301,7 +301,7 @@ struct kvm_vcpu_arch {
unsigned long mmu_seq;
} update_pte;
struct i387_fxsave_struct guest_fx_image;
struct fpu guest_fpu;
gva_t mmio_fault_cr2;
struct kvm_pio_request pio;
@@ -708,21 +708,6 @@ static inline unsigned long read_msr(unsigned long msr)
}
#endif
static inline void kvm_fx_save(struct i387_fxsave_struct *image)
{
asm("fxsave (%0)":: "r" (image));
}
static inline void kvm_fx_restore(struct i387_fxsave_struct *image)
{
asm("fxrstor (%0)":: "r" (image));
}
static inline void kvm_fx_finit(void)
{
asm("finit");
}
static inline u32 get_rdx_init_val(void)
{
return 0x600; /* P6 family */