[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 05/21] sysemu/memory_mapping: Become target-agnostic
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 05/21] sysemu/memory_mapping: Become target-agnostic |
Date: |
Mon, 7 Feb 2022 08:54:10 +0100 |
target_ulong is target-specific, while vaddr isn't.
Remove the unnecessary "exec/cpu-defs.h" target-speficic header
from "memory_mapping.h" and use the target-agnostic "hw/core/cpu.h"
locally in memory_mapping.c.
Remove "exec/memory.h" since MemoryRegion is forward-declared in
"qemu/typedefs.h".
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/sysemu/memory_mapping.h | 5 ++---
softmmu/memory_mapping.c | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h
index 4b20f1a639..3bbeb1bcb4 100644
--- a/include/sysemu/memory_mapping.h
+++ b/include/sysemu/memory_mapping.h
@@ -15,8 +15,7 @@
#define MEMORY_MAPPING_H
#include "qemu/queue.h"
-#include "exec/cpu-defs.h"
-#include "exec/memory.h"
+#include "exec/cpu-common.h"
typedef struct GuestPhysBlock {
/* visible to guest, reflects PCI hole, etc */
@@ -43,7 +42,7 @@ typedef struct GuestPhysBlockList {
/* The physical and virtual address in the memory mapping are contiguous. */
typedef struct MemoryMapping {
hwaddr phys_addr;
- target_ulong virt_addr;
+ vaddr virt_addr;
ram_addr_t length;
QTAILQ_ENTRY(MemoryMapping) next;
} MemoryMapping;
diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c
index a62eaa49cc..8320165ea2 100644
--- a/softmmu/memory_mapping.c
+++ b/softmmu/memory_mapping.c
@@ -17,6 +17,7 @@
#include "sysemu/memory_mapping.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
+#include "hw/core/cpu.h"
//#define DEBUG_GUEST_PHYS_REGION_ADD
--
2.34.1
- [PATCH v3 08/21] accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE, (continued)
- [PATCH v3 08/21] accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 10/21] accel: Introduce AccelOpsClass::cpu_thread_is_idle(), Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 15/21] softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 21/21] softmmu: Build target-agnostic objects once, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 13/21] softmmu/runstate: Clean headers, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 16/21] misc: Remove unnecessary "sysemu/cpu-timers.h" include, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 17/21] misc: Add missing "sysemu/cpu-timers.h" include, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 20/21] softmmu: Add qemu_init_arch_modules(), Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 09/21] softmmu/cpus: Code movement, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 18/21] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 05/21] sysemu/memory_mapping: Become target-agnostic,
Philippe Mathieu-Daudé <=
- [PATCH v3 14/21] softmmu/physmem: Remove unnecessary include, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 12/21] softmmu/globals: Remove unused 'hw/i386/*' headers, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 19/21] exec/cpu: Make address_space_init/reloading_memory_map target agnostic, Philippe Mathieu-Daudé, 2022/02/07
- [PATCH v3 11/21] accel: Introduce AccelOpsClass::cpus_are_resettable(), Philippe Mathieu-Daudé, 2022/02/07