From patchwork Sat Dec 24 20:29:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Evans X-Patchwork-Id: 9488115 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 CEBAF604DE for ; Sat, 24 Dec 2016 20:29:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5531205A8 for ; Sat, 24 Dec 2016 20:29:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6F9920649; Sat, 24 Dec 2016 20:29:58 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 37D58205A8 for ; Sat, 24 Dec 2016 20:29:56 +0000 (UTC) Received: from localhost ([::1]:44673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cKsx1-0001mx-HQ for patchwork-qemu-devel@patchwork.kernel.org; Sat, 24 Dec 2016 15:29:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <3rdpeWAMKCqYJPKMUUMRK.IUSWKSa-JKbKRTUTMTa.UXM@flex--dje.bounces.google.com>) id 1cKswi-0001ms-3z for qemu-devel@nongnu.org; Sat, 24 Dec 2016 15:29:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <3rdpeWAMKCqYJPKMUUMRK.IUSWKSa-JKbKRTUTMTa.UXM@flex--dje.bounces.google.com>) id 1cKswh-00024b-AV for qemu-devel@nongnu.org; Sat, 24 Dec 2016 15:29:36 -0500 Received: from mail-pg0-x24a.google.com ([2607:f8b0:400e:c05::24a]:34899) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <3rdpeWAMKCqYJPKMUUMRK.IUSWKSa-JKbKRTUTMTa.UXM@flex--dje.bounces.google.com>) id 1cKswh-000233-4q for qemu-devel@nongnu.org; Sat, 24 Dec 2016 15:29:35 -0500 Received: by mail-pg0-x24a.google.com with SMTP id u5so5493190pgi.2 for ; Sat, 24 Dec 2016 12:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:message-id:date:subject:from:to; bh=WSZ+mS8LJOF5aTmKJ77imqHolf9daQH901CxmP2gwAs=; b=ZcdTmsvYTChJxwIohRrfbtHKTkYcYT42mNWzNdsNR4avO/LS+Xiw/0gflyb5PNYOfm mmArfzdx6i+sU/IZKoQHQV/i6+hITkzHYQ1Ri2JeVbj6jTSOAv6iMNKbblfLEbqharJL s1eoPjxutY2uPfsnvbBLcwB1mW/Ouxhv0OB98WhESVoboaZVCU7WmR1Wp5gGWQg/g2FW JgqEAJPnp8pYP6q5Y7CZmTHq1xyyuph/Hy3Cdg+NNJKRjQesk9cW2wCgLlBy+ArjU3fb s+qC41WwjPC0MuKwjlPalFZmUlpC+vFwA40BR9d9whOuOn94WHLwoDKcHAryhiLIlkHq bFPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:message-id:date:subject:from:to; bh=WSZ+mS8LJOF5aTmKJ77imqHolf9daQH901CxmP2gwAs=; b=CsDvgR1PMuOBXNzA1Oq/1jfsEGo9Y7ko6mdqEPRApQJNVT/06OzVLBkW7nFZkkLwdw TInzKvAg35v3b2nmm/d0SfJ1i0IJh06osNtRcUr+wqhxgekH7RhlnvrVv0wGDNrhm13n cNcx4m4vemh+2Rgctj4HjzN32IIbiUCCvxYwwtsIhSZKBDmXHHGjU2gE8Q9NpZfulYrU +f5dZZ3HdQTNIv/eKXnyFKiy5M8Tna7ovU5id3CT2JI7F62c+RmF1vjnPI8jXIAeJ5CN X/4UU8IEE/6MMFxrEhRPSjPDyqY4o+0848OCrGJmOL/fFU6foSbgcl8d4uZIXQ3sA0PP RH1A== X-Gm-Message-State: AIkVDXKXpMPZN74tropVjHYY4RaLsjcQ8fFwJsKcvlSMFoOn6R7HR/3WV/kOT0MgxVZLVmkk9e4rJ9qyyBF+vU2jKqC9v+rtG/UlDCoNbZ0R+ZoDyWGtKzxNVFFkMfvGi1Svjb66yJiF96uuEJCAAatMnYhz6jFurpsu+YYOhI3gQ64= MIME-Version: 1.0 X-Received: by 10.99.116.9 with SMTP id p9mr10968398pgc.109.1482611373947; Sat, 24 Dec 2016 12:29:33 -0800 (PST) Message-ID: Date: Sat, 24 Dec 2016 20:29:33 +0000 From: Doug Evans To: qemu-devel@nongnu.org, pbonzini@redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::24a Subject: [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: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP In commit c52ab08aee6f7d4717fc6b517174043126bd302f, the patch snippet for the "syscall" insn got applied to "iret". Signed-off-by: Doug Evans --- target/i386/translate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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) { diff --git a/target/i386/translate.c b/target/i386/translate.c index 59e11fc..7e9d073 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;