qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target/i386: Fix bad patch application to translate.c
@ 2016-12-24 20:29 Doug Evans
  2016-12-28 16:53 ` Eduardo Habkost
  0 siblings, 1 reply; 2+ messages in thread
From: Doug Evans @ 2016-12-24 20:29 UTC (permalink / raw)
  To: qemu-devel, pbonzini

In commit c52ab08aee6f7d4717fc6b517174043126bd302f,
the patch snippet for the "syscall" insn got applied to "iret".

Signed-off-by: Doug Evans <dje@google.com>
---
  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..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;
      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) {
-- 
2.8.0.rc3.226.g39d4020

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] target/i386: Fix bad patch application to translate.c
  2016-12-24 20:29 [Qemu-devel] [PATCH] target/i386: Fix bad patch application to translate.c Doug Evans
@ 2016-12-28 16:53 ` Eduardo Habkost
  0 siblings, 0 replies; 2+ messages in thread
From: Eduardo Habkost @ 2016-12-28 16:53 UTC (permalink / raw)
  To: Doug Evans; +Cc: qemu-devel, pbonzini

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 <dje@google.com>

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) {
-- 
2.7.4


> ---
>  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..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;
>      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) {
> -- 
> 2.8.0.rc3.226.g39d4020
> 
> 

-- 
Eduardo

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-28 16:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-24 20:29 [Qemu-devel] [PATCH] target/i386: Fix bad patch application to translate.c Doug Evans
2016-12-28 16:53 ` Eduardo Habkost

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).