Skip to contentSkip to conversation

Make CPUID 4 work again

PATCH New Alexander Graf 1 participant 1 message Dec 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make CPUID 4 work again

The recent split of the CPUID helper function broke CPUID 4, which relies on ECX information.
This patch writes ECX into the ecx variable, which is used by cpu_x86_cpuid to enumerate the current index.

Using this patch booting Linux with -cpu core2duo works again.

op_helper.c +1 -0
Index: target-i386/op_helper.c
===================================================================
@@ -1898,6 +1898,7 @@
 
     helper_svm_check_intercept_param(SVM_EXIT_CPUID, 0);
 
+    ecx = ECX;
     cpu_x86_cpuid(env, (uint32_t)EAX, &eax, &ebx, &ecx, &edx);
     EAX = eax;
     EBX = ebx;