Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and mstsirkin committed Jun 23, 2023
1 parent 5c33f97 commit b3b408f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/exec/target_page.h
Expand Up @@ -15,6 +15,7 @@
#define EXEC_TARGET_PAGE_H

size_t qemu_target_page_size(void);
int qemu_target_page_mask(void);
int qemu_target_page_bits(void);
int qemu_target_page_bits_min(void);

Expand Down
5 changes: 5 additions & 0 deletions softmmu/physmem.c
Expand Up @@ -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;
Expand Down

0 comments on commit b3b408f

Please sign in to comment.