From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDGp6-0007nN-Jn for qemu-devel@nongnu.org; Thu, 18 Dec 2008 06:13:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDGp4-0007lb-Lo for qemu-devel@nongnu.org; Thu, 18 Dec 2008 06:13:44 -0500 Received: from [199.232.76.173] (port=39901 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDGp4-0007lD-Fi for qemu-devel@nongnu.org; Thu, 18 Dec 2008 06:13:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:48226) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LDGp4-0003A3-4q for qemu-devel@nongnu.org; Thu, 18 Dec 2008 06:13:42 -0500 Message-ID: <494A3063.6070302@suse.de> Date: Thu, 18 Dec 2008 12:13:39 +0100 From: Alexander Graf MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060007010508010703090804" Subject: [Qemu-devel] [PATCH] Make CPUID 4 work again Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------060007010508010703090804 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. Signed-off-by: Alexander Graf --------------060007010508010703090804 Content-Type: text/x-patch; name="qemu-cpuid4.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-cpuid4.patch" Index: target-i386/op_helper.c =================================================================== --- target-i386/op_helper.c (revision 6082) +++ target-i386/op_helper.c (working copy) @@ -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; --------------060007010508010703090804--