[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-9.1 07/12] plugins/api: Check for USER_ONLY definition instea
From: |
Philippe Mathieu-Daudé |
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 |
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
- Re: [PATCH-for-9.0? 02/12] travis-ci: Rename SOFTMMU -> SYSTEM, (continued)
- [PATCH-for-9.0? 03/12] gdbstub: Correct invalid mentions of 'softmmu' by 'system', Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.0? 05/12] target/ppc: Rename init_excp_4xx_softmmu() -> init_excp_4xx(), Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 06/12] tcg/sparc64: Check for USER_ONLY definition instead of SOFTMMU one, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.0? 04/12] gdbstub/system: Rename 'user_ctx' argument as 'ctx', Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 07/12] plugins/api: Check for USER_ONLY definition instead of SOFTMMU one,
Philippe Mathieu-Daudé <=
- [PATCH-for-9.0? 08/12] accel/tcg/tb-maint: Add comments around system emulation, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 09/12] accel/tcg/internal: Check for USER_ONLY definition instead of SOFTMMU, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 10/12] exec/cpu-defs: Restrict SOFTMMU specific definitions to accel/tcg/, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 11/12] tcg: Remove unused CONFIG_SOFTMMU definition from libtcg_system.fa, Philippe Mathieu-Daudé, 2024/03/13
- [PATCH-for-9.1 12/12] exec/poison: Poison CONFIG_SOFTMMU again, Philippe Mathieu-Daudé, 2024/03/13