xen/svm_cpuid_ffxsr_13743.patch

26 lines
1.3 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
@@ -1085,6 +1085,8 @@ static void svm_vmexit_do_cpuid(struct v
/* So far, we do not support 3DNow for the guest. */
clear_bit(X86_FEATURE_3DNOW & 31, &edx);
clear_bit(X86_FEATURE_3DNOWEXT & 31, &edx);
+ /* no FFXSR instructions feature. */
+ clear_bit(X86_FEATURE_FFXSR & 31, &edx);
}
}
else if ( ( input == 0x80000007 ) || ( input == 0x8000000A ) )
Index: xen-3.0.4-testing/xen/include/asm-x86/cpufeature.h
===================================================================
--- xen-3.0.4-testing.orig/xen/include/asm-x86/cpufeature.h
+++ xen-3.0.4-testing/xen/include/asm-x86/cpufeature.h
@@ -92,6 +92,7 @@
#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */
#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */
#define X86_FEATURE_SVME (6*32+ 2) /* Secure Virtual Machine */
+#define X86_FEATURE_FFXSR (6*32+25) /* FFXSR instruction optimizations */
#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)