All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk,
	alex.bennee@linaro.org, f4bug@amsat.org
Subject: [PATCH for-6.1 v4 11/15] target/i386: Implement debug_check_breakpoint
Date: Mon, 19 Jul 2021 11:22:35 -1000	[thread overview]
Message-ID: <20210719212239.428740-12-richard.henderson@linaro.org> (raw)
In-Reply-To: <20210719212239.428740-1-richard.henderson@linaro.org>

Return false for RF set, as we do in i386_tr_breakpoint_check.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/i386/tcg/tcg-cpu.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c
index e96ec9bbcc..238e3a9395 100644
--- a/target/i386/tcg/tcg-cpu.c
+++ b/target/i386/tcg/tcg-cpu.c
@@ -54,6 +54,17 @@ static void x86_cpu_synchronize_from_tb(CPUState *cs,
     cpu->env.eip = tb->pc - tb->cs_base;
 }
 
+#ifndef CONFIG_USER_ONLY
+static bool x86_debug_check_breakpoint(CPUState *cs)
+{
+    X86CPU *cpu = X86_CPU(cs);
+    CPUX86State *env = &cpu->env;
+
+    /* RF disables all architectural breakpoints. */
+    return !(env->eflags & RF_MASK);
+}
+#endif
+
 #include "hw/core/tcg-cpu-ops.h"
 
 static const struct TCGCPUOps x86_tcg_ops = {
@@ -66,6 +77,7 @@ static const struct TCGCPUOps x86_tcg_ops = {
     .tlb_fill = x86_cpu_tlb_fill,
 #ifndef CONFIG_USER_ONLY
     .debug_excp_handler = breakpoint_handler,
+    .debug_check_breakpoint = x86_debug_check_breakpoint,
 #endif /* !CONFIG_USER_ONLY */
 };
 
-- 
2.25.1



  parent reply	other threads:[~2021-07-19 21:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 21:22 [PATCH for-6.1 v4 00/15] tcg: breakpoint reorg Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 01/15] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 02/15] accel/tcg: Move curr_cflags into cpu-exec.c Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 03/15] target/alpha: Drop goto_tb path in gen_call_pal Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 04/15] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 05/15] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 06/15] accel/tcg: Handle -singlestep in curr_cflags Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 07/15] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 08/15] accel/tcg: Move cflags lookup into tb_find Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 09/15] hw/core: Introduce TCGCPUOps.debug_check_breakpoint Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 10/15] target/arm: Implement debug_check_breakpoint Richard Henderson
2021-07-19 21:22 ` Richard Henderson [this message]
2021-07-19 21:22 ` [PATCH for-6.1 v4 12/15] accel/tcg: Move breakpoint recognition outside translation Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 13/15] accel/tcg: Remove TranslatorOps.breakpoint_check Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 14/15] accel/tcg: Hoist tb_cflags to a local in translator_loop Richard Henderson
2021-07-19 21:22 ` [PATCH for-6.1 v4 15/15] accel/tcg: Record singlestep_enabled in tb->cflags Richard Henderson
2021-07-19 21:45   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210719212239.428740-12-richard.henderson@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.