aboutsummaryrefslogtreecommitdiff
path: root/softmmu/physmem.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-05-24 11:37:35 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-06-23 02:54:44 -0400
commitb3b408ffb9291e887029051a522a2c968a816d22 (patch)
treeb8e8184a3d5306614c07841f4872dcd471b60d5d /softmmu/physmem.c
parent5c33f9783ace0b5e077060b220978d94fecb3e81 (diff)
downloadqemu-b3b408ffb9291e887029051a522a2c968a816d22.zip
qemu-b3b408ffb9291e887029051a522a2c968a816d22.tar.gz
qemu-b3b408ffb9291e887029051a522a2c968a816d22.tar.bz2
softmmu: Introduce qemu_target_page_mask() helper
Since TARGET_PAGE_MASK is poisoned in target-agnostic code, introduce the qemu_target_page_mask() helper to get this value from target-agnostic code at runtime. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230524093744.88442-2-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'softmmu/physmem.c')
-rw-r--r--softmmu/physmem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 6bdd944..bda475a 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -3359,6 +3359,11 @@ size_t qemu_target_page_size(void)
return TARGET_PAGE_SIZE;
}
+int qemu_target_page_mask(void)
+{
+ return TARGET_PAGE_MASK;
+}
+
int qemu_target_page_bits(void)
{
return TARGET_PAGE_BITS;