target/i386: document incorrect semantics of watchpoint following MOV/POP SS
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 29 May 2024 11:31:39 +0000 (13:31 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 8 Jun 2024 08:33:38 +0000 (10:33 +0200)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/tcg/sysemu/bpt_helper.c

index c1d5fce250c855c3b409afdbd43c49bbd1d3c8bb..b29acf41c38670162f48c14dd1df9da1c48a066f 100644 (file)
@@ -215,6 +215,12 @@ void breakpoint_handler(CPUState *cs)
         if (cs->watchpoint_hit->flags & BP_CPU) {
             cs->watchpoint_hit = NULL;
             if (check_hw_breakpoints(env, false)) {
+                /*
+                 * FIXME: #DB should be delayed by one instruction if
+                 * INHIBIT_IRQ is set (STI cannot trigger a watchpoint).
+                 * The delayed #DB should also fuse with one generated
+                 * by ICEBP (aka INT1).
+                 */
                 raise_exception(env, EXCP01_DB);
             } else {
                 cpu_loop_exit_noexc(cs);