From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
qemu-ppc@nongnu.org, "Alexandre Iooss" <erdnaxe@crans.org>,
"Mahmoud Mandour" <ma.mandourr@gmail.com>
Subject: [PATCH-for-9.1 07/12] plugins/api: Check for USER_ONLY definition instead of SOFTMMU one
Date: Wed, 13 Mar 2024 22:33:34 +0100 [thread overview]
Message-ID: <20240313213339.82071-8-philmd@linaro.org> (raw)
In-Reply-To: <20240313213339.82071-1-philmd@linaro.org>
Since we *might* have user emulation with softmmu,
replace the system emulation check by !user emulation one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
plugins/api.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/plugins/api.c b/plugins/api.c
index 8fa5a600ac..06d3e95da2 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -294,14 +294,14 @@ bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t info)
* Virtual Memory queries
*/
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
static __thread struct qemu_plugin_hwaddr hwaddr_info;
#endif
struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
uint64_t vaddr)
{
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
CPUState *cpu = current_cpu;
unsigned int mmu_idx = get_mmuidx(info);
enum qemu_plugin_mem_rw rw = get_plugin_meminfo_rw(info);
@@ -323,7 +323,7 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info,
bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr)
{
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
return haddr->is_io;
#else
return false;
@@ -332,7 +332,7 @@ bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr)
uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr)
{
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
if (haddr) {
return haddr->phys_addr;
}
@@ -342,7 +342,7 @@ uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr)
const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h)
{
-#ifdef CONFIG_SOFTMMU
+#ifndef CONFIG_USER_ONLY
if (h && h->is_io) {
MemoryRegion *mr = h->mr;
if (!mr->name) {
--
2.41.0
next prev parent reply other threads:[~2024-03-13 21:35 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 21:33 [PATCH-for-9.1 00/12] accel/tcg: Finish replacing SOFTMMU -> SYSTEM Philippe Mathieu-Daudé
2024-03-13 21:33 ` [PATCH-for-9.0? 01/12] accel/tcg/plugin: Remove CONFIG_SOFTMMU_GATE definition Philippe Mathieu-Daudé
2024-03-14 7:16 ` Thomas Huth
2024-03-15 6:42 ` Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.0? 02/12] travis-ci: Rename SOFTMMU -> SYSTEM Philippe Mathieu-Daudé
2024-03-14 7:18 ` Thomas Huth
2024-03-15 6:42 ` Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.0? 03/12] gdbstub: Correct invalid mentions of 'softmmu' by 'system' Philippe Mathieu-Daudé
2024-03-15 21:13 ` Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.0? 04/12] gdbstub/system: Rename 'user_ctx' argument as 'ctx' Philippe Mathieu-Daudé
2024-03-15 21:14 ` Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.0? 05/12] target/ppc: Rename init_excp_4xx_softmmu() -> init_excp_4xx() Philippe Mathieu-Daudé
2024-03-14 4:24 ` Nicholas Piggin
2024-03-13 21:33 ` [PATCH-for-9.1 06/12] tcg/sparc64: Check for USER_ONLY definition instead of SOFTMMU one Philippe Mathieu-Daudé
2024-03-15 21:17 ` Richard Henderson
2024-03-15 21:31 ` Richard Henderson
2024-03-13 21:33 ` Philippe Mathieu-Daudé [this message]
2024-03-15 21:19 ` [PATCH-for-9.1 07/12] plugins/api: " Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.0? 08/12] accel/tcg/tb-maint: Add comments around system emulation Philippe Mathieu-Daudé
2024-03-13 21:33 ` [PATCH-for-9.1 09/12] accel/tcg/internal: Check for USER_ONLY definition instead of SOFTMMU Philippe Mathieu-Daudé
2024-03-15 21:25 ` Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.1 10/12] exec/cpu-defs: Restrict SOFTMMU specific definitions to accel/tcg/ Philippe Mathieu-Daudé
2024-03-15 21:29 ` Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.1 11/12] tcg: Remove unused CONFIG_SOFTMMU definition from libtcg_system.fa Philippe Mathieu-Daudé
2024-03-15 21:31 ` Richard Henderson
2024-03-13 21:33 ` [PATCH-for-9.1 12/12] exec/poison: Poison CONFIG_SOFTMMU again Philippe Mathieu-Daudé
2024-03-15 21:32 ` 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=20240313213339.82071-8-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=erdnaxe@crans.org \
--cc=ma.mandourr@gmail.com \
--cc=pbonzini@redhat.com \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--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).