summary refs log tree commit diff stats
path: root/system/physmem.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-12-07 10:41:27 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-04-26 15:28:11 +0200
commit75bbe6a4d2bc9c3681ab71021645d655ad045a75 (patch)
tree66bc852614d7ca0004ee157ed683cc98bdf5911a /system/physmem.c
parent8501048b501aec0d2d422aafd713348c235d8b83 (diff)
downloadfocaccia-qemu-75bbe6a4d2bc9c3681ab71021645d655ad045a75.tar.gz
focaccia-qemu-75bbe6a4d2bc9c3681ab71021645d655ad045a75.zip
exec: Expose 'target_page.h' API to user emulation
User-only objects might benefit from the "exec/target_page.h"
API, which allows to build some objects once for all targets.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231211212003.21686-3-philmd@linaro.org>
Diffstat (limited to 'system/physmem.c')
-rw-r--r--system/physmem.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/system/physmem.c b/system/physmem.c
index c3d04ca921..1a81c226ba 100644
--- a/system/physmem.c
+++ b/system/physmem.c
@@ -3540,36 +3540,6 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr,
     return 0;
 }
 
-/*
- * Allows code that needs to deal with migration bitmaps etc to still be built
- * target independent.
- */
-size_t qemu_target_page_size(void)
-{
-    return TARGET_PAGE_SIZE;
-}
-
-int qemu_target_page_bits(void)
-{
-    return TARGET_PAGE_BITS;
-}
-
-int qemu_target_page_bits_min(void)
-{
-    return TARGET_PAGE_BITS_MIN;
-}
-
-/* Convert target pages to MiB (2**20). */
-size_t qemu_target_pages_to_MiB(size_t pages)
-{
-    int page_bits = TARGET_PAGE_BITS;
-
-    /* So far, the largest (non-huge) page size is 64k, i.e. 16 bits. */
-    g_assert(page_bits < 20);
-
-    return pages >> (20 - page_bits);
-}
-
 bool cpu_physical_memory_is_io(hwaddr phys_addr)
 {
     MemoryRegion*mr;