diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-25 11:16:14 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-06-08 10:33:38 +0200 |
commit | b37c0dc85214e9d5e4a9b6f6a496ce4de3b8a4d6 (patch) | |
tree | 1787a94a84520aa02d5f6a15b4b627aa268a555c | |
parent | cdc829b37d4dff686f083c577490da1d75bc159f (diff) | |
download | qemu-b37c0dc85214e9d5e4a9b6f6a496ce4de3b8a4d6.zip qemu-b37c0dc85214e9d5e4a9b6f6a496ce4de3b8a4d6.tar.gz qemu-b37c0dc85214e9d5e4a9b6f6a496ce4de3b8a4d6.tar.bz2 |
target/i386: document use of DISAS_NORETURN
DISAS_NORETURN suppresses the work normally done by gen_eob(), and therefore
must be used in special cases only. Document them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | target/i386/tcg/translate.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index a9c6424..2b6f67b 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -4761,6 +4761,17 @@ static void i386_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu) switch (dc->base.is_jmp) { case DISAS_NORETURN: + /* + * Most instructions should not use DISAS_NORETURN, as that suppresses + * the handling of hflags normally done by gen_eob(). We can + * get here: + * - for exception and interrupts + * - for jump optimization (which is disabled by INHIBIT_IRQ/RF/TF) + * - for VMRUN because RF/TF handling for the host is done after vmexit, + * and INHIBIT_IRQ is loaded from the VMCB + * - for HLT/PAUSE/MWAIT to exit the main loop with specific EXCP_* values; + * the helpers handle themselves the tasks normally done by gen_eob(). + */ break; case DISAS_TOO_MANY: gen_update_cc_op(dc); |