From patchwork Wed Dec 28 16:53:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 9490557 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CCA4360488 for ; Wed, 28 Dec 2016 16:53:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F46F2621F for ; Wed, 28 Dec 2016 16:53:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83D9A26242; Wed, 28 Dec 2016 16:53:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F12132621F for ; Wed, 28 Dec 2016 16:53:53 +0000 (UTC) Received: from localhost ([::1]:60008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMHU8-0006Yn-Ai for patchwork-qemu-devel@patchwork.kernel.org; Wed, 28 Dec 2016 11:53:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMHTt-0006YX-Ia for qemu-devel@nongnu.org; Wed, 28 Dec 2016 11:53:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMHTq-0005Hp-HZ for qemu-devel@nongnu.org; Wed, 28 Dec 2016 11:53:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44604) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cMHTq-0005Hk-9b for qemu-devel@nongnu.org; Wed, 28 Dec 2016 11:53:34 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0327EC0567B5; Wed, 28 Dec 2016 16:53:33 +0000 (UTC) Received: from localhost (ovpn-116-29.gru2.redhat.com [10.97.116.29]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBSGrVMc024372; Wed, 28 Dec 2016 11:53:32 -0500 Date: Wed, 28 Dec 2016 14:53:30 -0200 From: Eduardo Habkost To: Doug Evans Message-ID: <20161228165330.GA23551@thinpad.lan.raisama.net> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Fnord: you can see the fnord User-Agent: Mutt/1.7.1 (2016-10-04) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 28 Dec 2016 16:53:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: Re: [Qemu-devel] [PATCH] target/i386: Fix bad patch application to translate.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Sat, Dec 24, 2016 at 08:29:33PM +0000, Doug Evans wrote: > In commit c52ab08aee6f7d4717fc6b517174043126bd302f, > the patch snippet for the "syscall" insn got applied to "iret". > > Signed-off-by: Doug Evans Patch was corrupt, I have fixed line wrapping by hand and had to use git-am --ignore-whitespace to apply it. I suggest using git-send-email, as e-mail clients often break patch contents when copying&pasting. Fixed patch below, for reference: --- target/i386/translate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/translate.c b/target/i386/translate.c index 59e11fc..7adfff0 100644 --- a/target/i386/translate.c +++ b/target/i386/translate.c @@ -6435,10 +6435,7 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, tcg_const_i32(s->pc - s->cs_base)); set_cc_op(s, CC_OP_EFLAGS); } - /* TF handling for the syscall insn is different. The TF bit is checked - after the syscall insn completes. This allows #DB to not be - generated after one has entered CPL0 if TF is set in FMASK. */ - gen_eob_worker(s, false, true); + gen_eob(s); break; case 0xe8: /* call im */ { @@ -7119,7 +7116,10 @@ static target_ulong disas_insn(CPUX86State *env, DisasContext *s, gen_update_cc_op(s); gen_jmp_im(pc_start - s->cs_base); gen_helper_syscall(cpu_env, tcg_const_i32(s->pc - pc_start)); - gen_eob(s); + /* TF handling for the syscall insn is different. The TF bit is checked + after the syscall insn completes. This allows #DB to not be + generated after one has entered CPL0 if TF is set in FMASK. */ + gen_eob_worker(s, false, true); break; case 0x107: /* sysret */ if (!s->pe) {