[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] vmx realmode: Implement new x86_emulate hook load_fpu_ctxt().
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1201098656 0 # Node ID 5a3448506d9c2532ef1e45b1571ac20ee264f6ee # Parent 5f3a178a80fce61fd0f573e00b7faadbba993cc4 vmx realmode: Implement new x86_emulate hook load_fpu_ctxt(). Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/arch/x86/hvm/vmx/realmode.c | 10 +++++++++- xen/arch/x86/hvm/vmx/vmx.c | 2 +- xen/include/asm-x86/hvm/vmx/vmx.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff -r 5f3a178a80fc -r 5a3448506d9c xen/arch/x86/hvm/vmx/realmode.c --- a/xen/arch/x86/hvm/vmx/realmode.c Wed Jan 23 14:30:29 2008 +0000 +++ b/xen/arch/x86/hvm/vmx/realmode.c Wed Jan 23 14:30:56 2008 +0000 @@ -471,6 +471,13 @@ static int realmode_inject_sw_interrupt( rm_ctxt->exn_insn_len = insn_len; return X86EMUL_OKAY; +} + +static void realmode_load_fpu_ctxt( + struct x86_emulate_ctxt *ctxt) +{ + if ( !current->fpu_dirtied ) + vmx_do_no_device_fault(); } static struct x86_emulate_ops realmode_emulator_ops = { @@ -491,7 +498,8 @@ static struct x86_emulate_ops realmode_e .cpuid = realmode_cpuid, .hlt = realmode_hlt, .inject_hw_exception = realmode_inject_hw_exception, - .inject_sw_interrupt = realmode_inject_sw_interrupt + .inject_sw_interrupt = realmode_inject_sw_interrupt, + .load_fpu_ctxt = realmode_load_fpu_ctxt }; void vmx_realmode(struct cpu_user_regs *regs) diff -r 5f3a178a80fc -r 5a3448506d9c xen/arch/x86/hvm/vmx/vmx.c --- a/xen/arch/x86/hvm/vmx/vmx.c Wed Jan 23 14:30:29 2008 +0000 +++ b/xen/arch/x86/hvm/vmx/vmx.c Wed Jan 23 14:30:56 2008 +0000 @@ -1214,7 +1214,7 @@ static void __update_guest_eip(unsigned vmx_inject_exception(TRAP_debug, HVM_DELIVER_NO_ERROR_CODE, 0); } -static void vmx_do_no_device_fault(void) +void vmx_do_no_device_fault(void) { struct vcpu *v = current; diff -r 5f3a178a80fc -r 5a3448506d9c xen/include/asm-x86/hvm/vmx/vmx.h --- a/xen/include/asm-x86/hvm/vmx/vmx.h Wed Jan 23 14:30:29 2008 +0000 +++ b/xen/include/asm-x86/hvm/vmx/vmx.h Wed Jan 23 14:30:56 2008 +0000 @@ -33,6 +33,7 @@ void vmx_do_resume(struct vcpu *); void vmx_do_resume(struct vcpu *); void set_guest_time(struct vcpu *v, u64 gtime); void vmx_vlapic_msr_changed(struct vcpu *v); +void vmx_do_no_device_fault(void); void vmx_cpuid_intercept( unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |