29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
Index: xen-3.0.4-testing/xen/arch/x86/hvm/svm/svm.c
|
|
===================================================================
|
|
--- xen-3.0.4-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
|
+++ xen-3.0.4-testing/xen/arch/x86/hvm/svm/svm.c
|
|
@@ -1745,6 +1745,13 @@ int npt_mov_to_cr(int gpreg, int cr, str
|
|
case 0:
|
|
vmcb->cr0 = value;
|
|
v->arch.hvm_svm.cpu_shadow_cr0 = value;
|
|
+
|
|
+ /* TS cleared? Then initialise FPU now. */
|
|
+ if ( !(value & X86_CR0_TS) ) {
|
|
+ setup_fpu(v);
|
|
+ vmcb->exception_intercepts &= ~EXCEPTION_BITMAP_NM;
|
|
+ }
|
|
+
|
|
npt_update_guest_paging_mode(v);
|
|
break;
|
|
case 3:
|
|
@@ -1755,8 +1762,8 @@ int npt_mov_to_cr(int gpreg, int cr, str
|
|
case 4: /* CR4 */
|
|
vmcb->cr4 = value;
|
|
v->arch.hvm_svm.cpu_shadow_cr4 = value;
|
|
- npt_update_guest_paging_mode(v);
|
|
set_bit(ARCH_SVM_VMCB_ASSIGN_ASID, &v->arch.hvm_svm.flags);
|
|
+ npt_update_guest_paging_mode(v);
|
|
break;
|
|
case 8:
|
|
vlapic_set_reg(vlapic, APIC_TASKPRI, ((value & 0x0F) << 4));
|