Index: /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h	(revision 74702)
+++ /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h	(revision 74703)
@@ -7992,4 +7992,6 @@
      * Raise exceptions.
      */
+    if (!(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE))
+        return iemRaiseUndefinedOpcode(pVCpu);
     /* When in VMX non-root mode and XSAVE/XRSTOR is not enabled, it results in #UD. */
     if (    IEM_VMX_IS_NON_ROOT_MODE(pVCpu)
@@ -7999,6 +8001,4 @@
         return iemRaiseUndefinedOpcode(pVCpu);
     }
-    if (!(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE))
-        return iemRaiseUndefinedOpcode(pVCpu);
     if (pVCpu->cpum.GstCtx.cr0 & X86_CR0_TS)
         return iemRaiseDeviceNotAvailable(pVCpu);
@@ -8155,4 +8155,6 @@
      * Raise exceptions.
      */
+    if (!(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE))
+        return iemRaiseUndefinedOpcode(pVCpu);
     /* When in VMX non-root mode and XSAVE/XRSTOR is not enabled, it results in #UD. */
     if (    IEM_VMX_IS_NON_ROOT_MODE(pVCpu)
@@ -8162,6 +8164,4 @@
         return iemRaiseUndefinedOpcode(pVCpu);
     }
-    if (!(pVCpu->cpum.GstCtx.cr4 & X86_CR4_OSXSAVE))
-        return iemRaiseUndefinedOpcode(pVCpu);
     if (pVCpu->cpum.GstCtx.cr0 & X86_CR0_TS)
         return iemRaiseDeviceNotAvailable(pVCpu);
