ia64/xen-unstable
changeset 16861:5a3448506d9c
vmx realmode: Implement new x86_emulate hook load_fpu_ctxt().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Wed Jan 23 14:30:56 2008 +0000 (2008-01-23) |
parents | 5f3a178a80fc |
children | 1c826ea72a80 |
files | xen/arch/x86/hvm/vmx/realmode.c xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/vmx/vmx.h |
line diff
1.1 --- a/xen/arch/x86/hvm/vmx/realmode.c Wed Jan 23 14:30:29 2008 +0000 1.2 +++ b/xen/arch/x86/hvm/vmx/realmode.c Wed Jan 23 14:30:56 2008 +0000 1.3 @@ -473,6 +473,13 @@ static int realmode_inject_sw_interrupt( 1.4 return X86EMUL_OKAY; 1.5 } 1.6 1.7 +static void realmode_load_fpu_ctxt( 1.8 + struct x86_emulate_ctxt *ctxt) 1.9 +{ 1.10 + if ( !current->fpu_dirtied ) 1.11 + vmx_do_no_device_fault(); 1.12 +} 1.13 + 1.14 static struct x86_emulate_ops realmode_emulator_ops = { 1.15 .read = realmode_emulate_read, 1.16 .insn_fetch = realmode_emulate_insn_fetch, 1.17 @@ -491,7 +498,8 @@ static struct x86_emulate_ops realmode_e 1.18 .cpuid = realmode_cpuid, 1.19 .hlt = realmode_hlt, 1.20 .inject_hw_exception = realmode_inject_hw_exception, 1.21 - .inject_sw_interrupt = realmode_inject_sw_interrupt 1.22 + .inject_sw_interrupt = realmode_inject_sw_interrupt, 1.23 + .load_fpu_ctxt = realmode_load_fpu_ctxt 1.24 }; 1.25 1.26 void vmx_realmode(struct cpu_user_regs *regs)
2.1 --- a/xen/arch/x86/hvm/vmx/vmx.c Wed Jan 23 14:30:29 2008 +0000 2.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Jan 23 14:30:56 2008 +0000 2.3 @@ -1214,7 +1214,7 @@ static void __update_guest_eip(unsigned 2.4 vmx_inject_exception(TRAP_debug, HVM_DELIVER_NO_ERROR_CODE, 0); 2.5 } 2.6 2.7 -static void vmx_do_no_device_fault(void) 2.8 +void vmx_do_no_device_fault(void) 2.9 { 2.10 struct vcpu *v = current; 2.11
3.1 --- a/xen/include/asm-x86/hvm/vmx/vmx.h Wed Jan 23 14:30:29 2008 +0000 3.2 +++ b/xen/include/asm-x86/hvm/vmx/vmx.h Wed Jan 23 14:30:56 2008 +0000 3.3 @@ -33,6 +33,7 @@ void vmx_intr_assist(void); 3.4 void vmx_do_resume(struct vcpu *); 3.5 void set_guest_time(struct vcpu *v, u64 gtime); 3.6 void vmx_vlapic_msr_changed(struct vcpu *v); 3.7 +void vmx_do_no_device_fault(void); 3.8 void vmx_cpuid_intercept( 3.9 unsigned int *eax, unsigned int *ebx, 3.10 unsigned int *ecx, unsigned int *edx);