An SVM enabled processor should provide the CPUID extended leaf Fn8000_000A
(see AMD documentation #25481). The attached patch add this feature.


        Bernhard Kauer
Index: target-i386/helper.c
===================================================================
RCS file: /sources/qemu/qemu/target-i386/helper.c,v
retrieving revision 1.97
diff -u -r1.97 helper.c
--- target-i386/helper.c	9 Dec 2007 23:39:22 -0000	1.97
+++ target-i386/helper.c	18 Dec 2007 12:40:06 -0000
@@ -1751,6 +1819,12 @@
         ECX = 0;
         EDX = 0;
         break;
+    case 0x8000000A:
+        EAX = 0x00000001;
+        EBX = 0;
+        ECX = 0;
+        EDX = 0;
+	break;
     default:
         /* reserved values: zero */
         EAX = 0;
Index: target-i386/helper2.c
===================================================================
RCS file: /sources/qemu/qemu/target-i386/helper2.c,v
retrieving revision 1.60
diff -u -r1.60 helper2.c
--- target-i386/helper2.c	9 Dec 2007 02:43:19 -0000	1.60
+++ target-i386/helper2.c	18 Dec 2007 12:40:06 -0000
@@ -150,7 +150,7 @@
         .ext2_features = (PPRO_FEATURES & 0x0183F3FF) | 
             CPUID_EXT2_LM | CPUID_EXT2_SYSCALL | CPUID_EXT2_NX,
         .ext3_features = CPUID_EXT3_SVM,
-        .xlevel = 0x80000008,
+        .xlevel = 0x8000000A,
     },
 #endif
     {

Reply via email to