diff mbox series

[v2,45/50] target/i386: Exit tb after wrmsr

Message ID 20210514151342.384376-46-richard.henderson@linaro.org
State Superseded
Headers show
Series target/i386 translate cleanups | expand

Commit Message

Richard Henderson May 14, 2021, 3:13 p.m. UTC
At minimum, wrmsr can change efer, which affects HF_LMA.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/i386/tcg/translate.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.25.1

Comments

Paolo Bonzini May 18, 2021, 10:02 a.m. UTC | #1
On 14/05/21 17:13, Richard Henderson wrote:
> At minimum, wrmsr can change efer, which affects HF_LMA.

> 

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>   target/i386/tcg/translate.c | 2 ++

>   1 file changed, 2 insertions(+)

> 

> diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c

> index 2aa2410336..6eeaa3a98b 100644

> --- a/target/i386/tcg/translate.c

> +++ b/target/i386/tcg/translate.c

> @@ -7260,6 +7260,8 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)

>                   gen_helper_rdmsr(cpu_env);

>               } else {

>                   gen_helper_wrmsr(cpu_env);

> +                gen_jmp_im(s, s->pc - s->cs_base);

> +                gen_eob(s);

>               }

>           }

>           break;

> 


Cc: qemu-stable@nongnu.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
diff mbox series

Patch

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 2aa2410336..6eeaa3a98b 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -7260,6 +7260,8 @@  static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
                 gen_helper_rdmsr(cpu_env);
             } else {
                 gen_helper_wrmsr(cpu_env);
+                gen_jmp_im(s, s->pc - s->cs_base);
+                gen_eob(s);
             }
         }
         break;