From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JeEy6-0007Dp-PN for qemu-devel@nongnu.org; Tue, 25 Mar 2008 15:37:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JeEy4-0007B7-PJ for qemu-devel@nongnu.org; Tue, 25 Mar 2008 15:37:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JeEy4-0007Ad-5o for qemu-devel@nongnu.org; Tue, 25 Mar 2008 15:37:56 -0400 Received: from amistad.itbs.cz ([81.0.238.226]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JeEy3-00079w-QD for qemu-devel@nongnu.org; Tue, 25 Mar 2008 15:37:56 -0400 Received: from localhost (localhost [127.0.0.1]) by amistad.itbs.cz (Postfix) with ESMTP id 126282F9618 for ; Tue, 25 Mar 2008 20:37:58 +0100 (CET) Received: from amistad.itbs.cz ([127.0.0.1]) by localhost (amistad.itbs.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26451-07 for ; Tue, 25 Mar 2008 20:37:58 +0100 (CET) Received: from [10.0.0.14] (182.70.broadband6.iol.cz [88.101.70.182]) by amistad.itbs.cz (Postfix) with ESMTP id 62BDB2F9618 for ; Tue, 25 Mar 2008 20:37:55 +0100 (CET) Message-ID: <47E95661.9090905@jermar.eu> Date: Tue, 25 Mar 2008 20:45:37 +0100 From: Jakub Jermar MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040706050908060603080401" Subject: [Qemu-devel] [PATCH] Bug in AMD64 emulation Was: [AMD64] Possible problem with the DF flag during the SYSCALL instruction 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. --------------040706050908060603080401 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, as no one has picked my previous report up yet, I am resending my patch again. The patch fixes a bug in the way QEMU emulates AMD64 instruction called SYSCALL. The problem appears to be stale DF variable. Jakub --------------040706050908060603080401 Content-Type: text/plain; name="patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch" --- helper.c 2008-01-06 20:38:45.000000000 +0100 +++ helper.c.new 2008-03-20 22:39:17.000000000 +0100 @@ -1008,6 +1008,7 @@ DESC_S_MASK | DESC_W_MASK | DESC_A_MASK); env->eflags &= ~env->fmask; + DF = 1 - (2 * ((env->eflags >> 10) & 1)); if (code64) env->eip = env->lstar; else --------------040706050908060603080401--