qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <eduardo@habkost.net>,
	"Stafford Horne" <shorne@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Yoshinori Sato" <ysato@users.sourceforge.jp>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Marek Vasut" <marex@denx.de>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Fabiano Rosas" <farosas@linux.ibm.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>, "Greg Kurz" <groug@kaod.org>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Anton Johansson" <anjo@rev.ng>,
	qemu-ppc@nongnu.org, "Chris Wulff" <crwulff@gmail.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: [PATCH-for-8.0 2/4] gdbstub: Use vaddr type for generic insert/remove_breakpoint() API
Date: Wed,  7 Dec 2022 18:41:27 +0100	[thread overview]
Message-ID: <20221207174129.77593-3-philmd@linaro.org> (raw)
In-Reply-To: <20221207174129.77593-1-philmd@linaro.org>

Both insert/remove_breakpoint() handlers are used in system and
user emulation. We can not use the 'hwaddr' type on user emulation,
we have to use 'vaddr' which is defined as "wide enough to contain
any #target_ulong virtual address".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 gdbstub/internals.h        | 6 ++++--
 include/sysemu/accel-ops.h | 6 +++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/gdbstub/internals.h b/gdbstub/internals.h
index eabb0341d1..b23999f951 100644
--- a/gdbstub/internals.h
+++ b/gdbstub/internals.h
@@ -9,9 +9,11 @@
 #ifndef _INTERNALS_H_
 #define _INTERNALS_H_
 
+#include "exec/cpu-common.h"
+
 bool gdb_supports_guest_debug(void);
-int gdb_breakpoint_insert(CPUState *cs, int type, hwaddr addr, hwaddr len);
-int gdb_breakpoint_remove(CPUState *cs, int type, hwaddr addr, hwaddr len);
+int gdb_breakpoint_insert(CPUState *cs, int type, vaddr addr, vaddr len);
+int gdb_breakpoint_remove(CPUState *cs, int type, vaddr addr, vaddr len);
 void gdb_breakpoint_remove_all(CPUState *cs);
 
 #endif /* _INTERNALS_H_ */
diff --git a/include/sysemu/accel-ops.h b/include/sysemu/accel-ops.h
index 8cc7996def..30690c71bd 100644
--- a/include/sysemu/accel-ops.h
+++ b/include/sysemu/accel-ops.h
@@ -10,7 +10,7 @@
 #ifndef ACCEL_OPS_H
 #define ACCEL_OPS_H
 
-#include "exec/hwaddr.h"
+#include "exec/cpu-common.h"
 #include "qom/object.h"
 
 #define ACCEL_OPS_SUFFIX "-ops"
@@ -48,8 +48,8 @@ struct AccelOpsClass {
 
     /* gdbstub hooks */
     bool (*supports_guest_debug)(void);
-    int (*insert_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len);
-    int (*remove_breakpoint)(CPUState *cpu, int type, hwaddr addr, hwaddr len);
+    int (*insert_breakpoint)(CPUState *cpu, int type, vaddr addr, vaddr len);
+    int (*remove_breakpoint)(CPUState *cpu, int type, vaddr addr, vaddr len);
     void (*remove_all_breakpoints)(CPUState *cpu);
 };
 
-- 
2.38.1



  parent reply	other threads:[~2022-12-07 17:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-07 17:41 [PATCH-for-8.0 0/4] target/cpu: System/User cleanups around hwaddr/vaddr Philippe Mathieu-Daudé
2022-12-07 17:41 ` [PATCH-for-8.0 1/4] cputlb: Restrict SavedIOTLB to system emulation Philippe Mathieu-Daudé
2022-12-08  8:40   ` Alex Bennée
2022-12-08 10:00     ` Philippe Mathieu-Daudé
2022-12-07 17:41 ` Philippe Mathieu-Daudé [this message]
2022-12-07 18:08   ` [PATCH-for-8.0 2/4] gdbstub: Use vaddr type for generic insert/remove_breakpoint() API Fabiano Rosas
2022-12-07 18:17     ` Philippe Mathieu-Daudé
2022-12-07 18:23   ` Peter Maydell
2022-12-07 18:27     ` Philippe Mathieu-Daudé
2022-12-07 20:15       ` Peter Maydell
2022-12-08  9:59         ` Philippe Mathieu-Daudé
2022-12-07 17:41 ` [PATCH-for-8.0 3/4] target/cpu: Restrict cpu_get_phys_page_debug() handlers to sysemu Philippe Mathieu-Daudé
2022-12-07 17:41 ` [PATCH-for-8.0 4/4] target/sparc: Cleanup around sparc_cpu_do_unaligned_access() Philippe Mathieu-Daudé

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=20221207174129.77593-3-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=anjo@rev.ng \
    --cc=atar4qemu@gmail.com \
    --cc=clg@kaod.org \
    --cc=crwulff@gmail.com \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=edgar.iglesias@gmail.com \
    --cc=eduardo@habkost.net \
    --cc=farosas@linux.ibm.com \
    --cc=groug@kaod.org \
    --cc=jcmvbkbc@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=marex@denx.de \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=shorne@gmail.com \
    --cc=wangyanan55@huawei.com \
    --cc=ysato@users.sourceforge.jp \
    /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).