[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/33] exec: Declare vaddr as a generic target-agnostic type
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 03/33] exec: Declare vaddr as a generic target-agnostic type |
Date: |
Sun, 6 Mar 2022 13:59:30 +0100 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Move vaddr type declaration to the generic "exec/cpu-common.h" header.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220207075426.81934-4-f4bug@amsat.org>
---
include/exec/cpu-common.h | 12 ++++++++++++
include/hw/core/cpu.h | 13 +------------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index de5f444b193..cd1d7328a1d 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -7,6 +7,18 @@
#include "exec/hwaddr.h"
#endif
+/**
+ * vaddr:
+ * Type wide enough to contain any #target_ulong virtual address.
+ */
+typedef uint64_t vaddr;
+#define VADDR_PRId PRId64
+#define VADDR_PRIu PRIu64
+#define VADDR_PRIo PRIo64
+#define VADDR_PRIx PRIx64
+#define VADDR_PRIX PRIX64
+#define VADDR_MAX UINT64_MAX
+
/* Using intptr_t ensures that qemu_*_page_mask is sign-extended even
* when intptr_t is 32-bit and we are aligning a long long.
*/
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 76ab3b851c8..3f2b681281c 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -22,6 +22,7 @@
#include "hw/qdev-core.h"
#include "disas/dis-asm.h"
+#include "exec/cpu-common.h"
#include "exec/hwaddr.h"
#include "exec/memattrs.h"
#include "qapi/qapi-types-run-state.h"
@@ -35,18 +36,6 @@
typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size,
void *opaque);
-/**
- * vaddr:
- * Type wide enough to contain any #target_ulong virtual address.
- */
-typedef uint64_t vaddr;
-#define VADDR_PRId PRId64
-#define VADDR_PRIu PRIu64
-#define VADDR_PRIo PRIo64
-#define VADDR_PRIx PRIx64
-#define VADDR_PRIX PRIX64
-#define VADDR_MAX UINT64_MAX
-
/**
* SECTION:cpu
* @section_id: QEMU-cpu
--
2.35.1
- [PULL 00/33] Abstract ArchCPU, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 01/33] accel: Restrict sysemu stubs to system emulation, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 02/33] accel/meson: Only build hw virtualization with system emulation, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 03/33] exec: Declare vaddr as a generic target-agnostic type,
Philippe Mathieu-Daudé <=
- [PULL 04/33] exec: Make cpu_memory_rw_debug() target agnostic, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 05/33] sysemu/memory_mapping: Become target-agnostic, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 06/33] sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target agnostic, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 07/33] accel/kvm: Simplify user-mode #ifdef'ry, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 08/33] accel/hax: Introduce CONFIG_HAX_IS_POSSIBLE, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 09/33] softmmu/cpus: Code movement, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 10/33] accel: Introduce AccelOpsClass::cpu_thread_is_idle(), Philippe Mathieu-Daudé, 2022/03/06
- [PULL 11/33] accel: Introduce AccelOpsClass::cpus_are_resettable(), Philippe Mathieu-Daudé, 2022/03/06
- [PULL 12/33] softmmu/globals: Remove unused 'hw/i386/*' headers, Philippe Mathieu-Daudé, 2022/03/06
- [PULL 13/33] softmmu/physmem: Remove unnecessary include, Philippe Mathieu-Daudé, 2022/03/06