WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] vmx realmode: Implement new x86_emulate h

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] vmx realmode: Implement new x86_emulate hook load_fpu_ctxt().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 10:20:21 -0800
Delivery-date: Wed, 23 Jan 2008 10:20:33 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] vmx realmode: Implement new x86_emulate hook load_fpu_ctxt()., Xen patchbot-unstable <=