aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xen/arch/x86/hvm/vmx/realmode.c10
-rw-r--r--xen/arch/x86/hvm/vmx/vmx.c2
-rw-r--r--xen/include/asm-x86/hvm/vmx/vmx.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/xen/arch/x86/hvm/vmx/realmode.c b/xen/arch/x86/hvm/vmx/realmode.c
index 39b1fdb590..6bb778e965 100644
--- a/xen/arch/x86/hvm/vmx/realmode.c
+++ b/xen/arch/x86/hvm/vmx/realmode.c
@@ -473,6 +473,13 @@ static int realmode_inject_sw_interrupt(
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 = {
.read = realmode_emulate_read,
.insn_fetch = realmode_emulate_insn_fetch,
@@ -491,7 +498,8 @@ static struct x86_emulate_ops realmode_emulator_ops = {
.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 --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 3cb137268e..486a7bf44d 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1214,7 +1214,7 @@ static void __update_guest_eip(unsigned long inst_len)
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 --git a/xen/include/asm-x86/hvm/vmx/vmx.h b/xen/include/asm-x86/hvm/vmx/vmx.h
index af50427ed3..ec03e75d9c 100644
--- a/xen/include/asm-x86/hvm/vmx/vmx.h
+++ b/xen/include/asm-x86/hvm/vmx/vmx.h
@@ -33,6 +33,7 @@ void vmx_intr_assist(void);
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);