On Wed, 20 May 2020 at 18:28, Richard Henderson
<richard.hender...@linaro.org> wrote:
>
> Transform the prot bit to a qemu internal page bit, and save
> it in the page tables.
>
> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> ---
>  include/exec/cpu-all.h     |  2 ++
>  linux-user/syscall_defs.h  |  4 ++++
>  linux-user/mmap.c          | 16 ++++++++++++++++
>  target/arm/translate-a64.c |  6 +++---
>  4 files changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
> index d14374bdd4..2bd023d692 100644
> --- a/include/exec/cpu-all.h
> +++ b/include/exec/cpu-all.h
> @@ -276,6 +276,8 @@ extern intptr_t qemu_host_page_mask;
>  /* FIXME: Code that sets/uses this is broken and needs to go away.  */
>  #define PAGE_RESERVED  0x0020
>  #endif
> +/* Target-specific bits that will be used via page_get_flags().  */
> +#define PAGE_TARGET_1  0x0080

I think it would also be nice to have

/* Target-specific names for the target-specific bits */
#ifdef TARGET_AARCH64
#define PAGE_BTI PAGE_TARGET_1
#endif

which can then (a) act as documentation of which PAGE_TARGET_n
each target is actually using and (b) mean that code that's
using the target-specific bits can use more friendly names.

Otherwise
Reviewed-by: Peter Maydell <peter.mayd...@linaro.org>

thanks
-- PMM

Reply via email to