aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/emulate.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-04-17 10:46:54 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-04-17 10:46:54 +0100
commit74a02d2244983e2fb2ade724bddae332d263b04a (patch)
treec2feb442ee7bfe825ae105d5f19a097cc055a33f /xen/arch/x86/hvm/emulate.c
parentf66e0a53eedb87de61c11049c4907058a9f43058 (diff)
downloadxen-74a02d2244983e2fb2ade724bddae332d263b04a.tar.gz
xen-74a02d2244983e2fb2ade724bddae332d263b04a.tar.bz2
xen-74a02d2244983e2fb2ade724bddae332d263b04a.zip
x86_emulate: Emulate MMX movq instructions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/emulate.c')
-rw-r--r--xen/arch/x86/hvm/emulate.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 5e50fc6f61..093bf571d9 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -674,16 +674,33 @@ static int hvmemul_inject_sw_interrupt(
return X86EMUL_OKAY;
}
-static void hvmemul_get_fpu(
+static int hvmemul_get_fpu(
void (*exception_callback)(void *, struct cpu_user_regs *),
void *exception_callback_arg,
+ enum x86_emulate_fpu_type type,
struct x86_emulate_ctxt *ctxt)
{
struct vcpu *curr = current;
+
+ switch ( type )
+ {
+ case X86EMUL_FPU_fpu:
+ break;
+ case X86EMUL_FPU_mmx:
+ if ( !cpu_has_mmx )
+ return X86EMUL_UNHANDLEABLE;
+ break;
+ default:
+ return X86EMUL_UNHANDLEABLE;
+ }
+
if ( !curr->fpu_dirtied )
hvm_funcs.fpu_dirty_intercept();
+
curr->arch.hvm_vcpu.fpu_exception_callback = exception_callback;
curr->arch.hvm_vcpu.fpu_exception_callback_arg = exception_callback_arg;
+
+ return X86EMUL_OKAY;
}
static void hvmemul_put_fpu(