[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.2-testing] vmx realmode: Implement new x86_emulate hook load_fpu_ctxt().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202291563 0
# Node ID 744ec35f1e3ab5aa6c5301c872c2f0685a46cd34
# Parent  98ec73f3b3f1defb8ead13ffaa04ac1576ef787b
vmx realmode: Implement new x86_emulate hook load_fpu_ctxt().
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   16861:5a3448506d9c2532ef1e45b1571ac20ee264f6ee
xen-unstable date:        Wed Jan 23 14:30:56 2008 +0000
---
 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 98ec73f3b3f1 -r 744ec35f1e3a xen/arch/x86/hvm/vmx/realmode.c
--- a/xen/arch/x86/hvm/vmx/realmode.c   Wed Feb 06 09:52:07 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/realmode.c   Wed Feb 06 09:52:43 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 98ec73f3b3f1 -r 744ec35f1e3a xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Wed Feb 06 09:52:07 2008 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Feb 06 09:52:43 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 98ec73f3b3f1 -r 744ec35f1e3a xen/include/asm-x86/hvm/vmx/vmx.h
--- a/xen/include/asm-x86/hvm/vmx/vmx.h Wed Feb 06 09:52:07 2008 +0000
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h Wed Feb 06 09:52:43 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.