qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé via" <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH 03/13] accel: Elide kvm_update_guest_debug by checking kvm_supports_guest_debug
Date: Tue,  8 Feb 2022 16:22:33 +0100	[thread overview]
Message-ID: <20220208152243.16452-4-f4bug@amsat.org> (raw)
In-Reply-To: <20220208152243.16452-1-f4bug@amsat.org>

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 accel/stubs/kvm-stub.c | 5 -----
 cpu.c                  | 2 +-
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c
index 7e0fb884b9..924ffbde85 100644
--- a/accel/stubs/kvm-stub.c
+++ b/accel/stubs/kvm-stub.c
@@ -46,11 +46,6 @@ int kvm_has_many_ioeventfds(void)
     return 0;
 }
 
-int kvm_update_guest_debug(CPUState *cpu, unsigned long reinject_trap)
-{
-    return -ENOSYS;
-}
-
 int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
                           target_ulong len, int type)
 {
diff --git a/cpu.c b/cpu.c
index 97d42b6b2a..834e2b4cdb 100644
--- a/cpu.c
+++ b/cpu.c
@@ -350,7 +350,7 @@ void cpu_single_step(CPUState *cpu, int enabled)
 {
     if (cpu->singlestep_enabled != enabled) {
         cpu->singlestep_enabled = enabled;
-        if (kvm_enabled()) {
+        if (kvm_enabled() && kvm_supports_guest_debug()) {
             kvm_update_guest_debug(cpu, 0);
         }
         trace_breakpoint_singlestep(cpu->cpu_index, enabled);
-- 
2.34.1



  parent reply	other threads:[~2022-02-08 17:59 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 15:22 [PATCH 00/13] exec: Move translation declarations to 'translate-all.h' Philippe Mathieu-Daudé via
2022-02-08 15:22 ` [PATCH 01/13] meson: Display libfdt as disabled when system emulation is disabled Philippe Mathieu-Daudé via
2022-02-08 16:15   ` Paolo Bonzini
2022-02-08 15:22 ` [PATCH 02/13] exec/cpu_ldst: Include 'cpu.h' to get target_ulong definition Philippe Mathieu-Daudé via
2022-02-08 22:10   ` Richard Henderson
2022-02-08 15:22 ` Philippe Mathieu-Daudé via [this message]
2022-02-08 22:16   ` [PATCH 03/13] accel: Elide kvm_update_guest_debug by checking kvm_supports_guest_debug Richard Henderson
2022-02-08 15:22 ` [PATCH 04/13] target/i386/cpu: Ensure accelerators set CPU addressble physical bits Philippe Mathieu-Daudé via
2022-02-08 22:16   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 05/13] target/i386/tcg/sysemu: Include missing 'exec/exec-all.h' header Philippe Mathieu-Daudé via
2022-02-08 22:17   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 06/13] cpu: Add missing 'exec/exec-all.h' and ''exec/exec-all.h'' headers Philippe Mathieu-Daudé via
2022-02-08 22:17   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 07/13] cpu: Move common code to cpu-common Philippe Mathieu-Daudé via
2022-02-08 22:29   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 08/13] target: Include missing 'cpu.h' Philippe Mathieu-Daudé via
2022-02-08 22:31   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 09/13] target: Use forward declared type instead of structure type Philippe Mathieu-Daudé via
2022-02-08 22:31   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 10/13] target: Use CPUArchState as interface to target-specific CPU state Philippe Mathieu-Daudé via
2022-02-08 22:40   ` Richard Henderson
2022-02-09 21:47     ` Philippe Mathieu-Daudé via
2022-02-08 15:22 ` [PATCH 11/13] exec/cpu_ldst: Restrict TCG-specific code Philippe Mathieu-Daudé via
2022-02-08 22:43   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 12/13] exec/cpu-all: Restrict cpu_copy() to user emulation Philippe Mathieu-Daudé via
2022-02-08 22:47   ` Richard Henderson
2022-02-08 15:22 ` [PATCH 13/13] exec: Move translation declarations to 'translate-all.h' Philippe Mathieu-Daudé via
2022-02-08 23:00   ` Richard Henderson
2022-02-09 21:50     ` Philippe Mathieu-Daudé via

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=20220208152243.16452-4-f4bug@amsat.org \
    --to=qemu-devel@nongnu.org \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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 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).