From b3b408ffb9291e887029051a522a2c968a816d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 24 May 2023 11:37:35 +0200 Subject: softmmu: Introduce qemu_target_page_mask() helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230524093744.88442-2-philmd@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Alex Bennée --- softmmu/physmem.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'softmmu') diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 6bdd944fe8..bda475a719 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; -- cgit v1.2.3