From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeV8U-0000Gd-SI for qemu-devel@nongnu.org; Tue, 03 Mar 2009 08:58:18 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeV8S-0000Fo-SI for qemu-devel@nongnu.org; Tue, 03 Mar 2009 08:58:18 -0500 Received: from [199.232.76.173] (port=56269 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeV8S-0000Fj-Nk for qemu-devel@nongnu.org; Tue, 03 Mar 2009 08:58:16 -0500 Received: from norkia.v3.sk ([92.240.234.41]:43650) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LeV8S-0001sP-AB for qemu-devel@nongnu.org; Tue, 03 Mar 2009 08:58:16 -0500 From: Lubomir Rintel Content-Type: text/plain Date: Tue, 03 Mar 2009 14:58:18 +0100 Message-Id: <1236088698.24907.3.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] Fix cpuid KVM crash on i386 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 Cc: avi@redhat.com Cpuid should return into vec, not overwrite past address in count. Changeset 6565 broke this. Signed-off-by: Lubomir Rintel Index: target-i386/helper.c =================================================================== --- target-i386/helper.c (revision 6676) +++ target-i386/helper.c (working copy) @@ -1418,10 +1418,10 @@ #else asm volatile("pusha \n\t" "cpuid \n\t" - "mov %%eax, 0(%1) \n\t" - "mov %%ebx, 4(%1) \n\t" - "mov %%ecx, 8(%1) \n\t" - "mov %%edx, 12(%1) \n\t" + "mov %%eax, 0(%2) \n\t" + "mov %%ebx, 4(%2) \n\t" + "mov %%ecx, 8(%2) \n\t" + "mov %%edx, 12(%2) \n\t" "popa" : : "a"(function), "c"(count), "S"(vec) : "memory", "cc");