[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/14] exec/cpu: Make host pages variables / macros 'target agnost
From: |
Paolo Bonzini |
Subject: |
[PULL 06/14] exec/cpu: Make host pages variables / macros 'target agnostic' |
Date: |
Thu, 27 Jan 2022 12:10:29 +0100 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
"host" pages are related to the *host* not the *target*,
thus the qemu_host_page_size / qemu_host_page_mask variables
and the HOST_PAGE_ALIGN() / REAL_HOST_PAGE_ALIGN() macros
can be moved to "exec/cpu-common.h" which is target agnostic.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220120000836.229419-1-f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/exec/cpu-all.h | 9 ---------
include/exec/cpu-common.h | 9 +++++++++
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index bb37239efa..84caf5c3d9 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -234,15 +234,6 @@ extern const TargetPageBits target_page;
#define TARGET_PAGE_ALIGN(addr) ROUND_UP((addr), TARGET_PAGE_SIZE)
-/* 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.
- */
-extern uintptr_t qemu_host_page_size;
-extern intptr_t qemu_host_page_mask;
-
-#define HOST_PAGE_ALIGN(addr) ROUND_UP((addr), qemu_host_page_size)
-#define REAL_HOST_PAGE_ALIGN(addr) ROUND_UP((addr), qemu_real_host_page_size)
-
/* same as PROT_xxx */
#define PAGE_READ 0x0001
#define PAGE_WRITE 0x0002
diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h
index 039d422bf4..de5f444b19 100644
--- a/include/exec/cpu-common.h
+++ b/include/exec/cpu-common.h
@@ -7,6 +7,15 @@
#include "exec/hwaddr.h"
#endif
+/* 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.
+ */
+extern uintptr_t qemu_host_page_size;
+extern intptr_t qemu_host_page_mask;
+
+#define HOST_PAGE_ALIGN(addr) ROUND_UP((addr), qemu_host_page_size)
+#define REAL_HOST_PAGE_ALIGN(addr) ROUND_UP((addr), qemu_real_host_page_size)
+
/* The CPU list lock nests outside page_(un)lock or mmap_(un)lock */
void qemu_init_cpu_list(void);
void cpu_list_lock(void);
--
2.34.1
- [PULL 00/14] Misc patches for 2022-01-27, Paolo Bonzini, 2022/01/27
- [PULL 12/14] check-block: replace -makecheck with TAP output, Paolo Bonzini, 2022/01/27
- [PULL 06/14] exec/cpu: Make host pages variables / macros 'target agnostic',
Paolo Bonzini <=
- [PULL 07/14] meson: Use find_program() to resolve the entitlement.sh script, Paolo Bonzini, 2022/01/27
- [PULL 04/14] intc: Unexport InterruptStatsProviderClass-related functions, Paolo Bonzini, 2022/01/27
- [PULL 01/14] build-sys: fix a meson deprecation warning, Paolo Bonzini, 2022/01/27
- [PULL 02/14] build-sys: fix undefined ARCH error, Paolo Bonzini, 2022/01/27
- [PULL 10/14] build: make check-block a meson test, Paolo Bonzini, 2022/01/27
- [PULL 13/14] qapi: Cleanup SGX related comments and restore @section-size, Paolo Bonzini, 2022/01/27
- [PULL 05/14] meson.build: Use a function from libfdt 1.5.1 for the library check, Paolo Bonzini, 2022/01/27
- [PULL 11/14] qemu-iotests: require at least an argument to check-block.sh, Paolo Bonzini, 2022/01/27
- [PULL 03/14] docker: add msitools to Fedora/mingw cross, Paolo Bonzini, 2022/01/27
- [PULL 08/14] check-block.sh: passthrough -jN flag of make to -j N flag of check, Paolo Bonzini, 2022/01/27