[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 01/20] exec: Use TARGET_PAGE_BITS_MIN for TLB flags
From: |
David Hildenbrand |
Subject: |
Re: [PATCH v3 01/20] exec: Use TARGET_PAGE_BITS_MIN for TLB flags |
Date: |
Mon, 23 Sep 2019 10:24:56 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 22.09.19 05:54, Richard Henderson wrote:
> These bits do not need to vary with the actual page size
> used by the guest.
>
> Reviewed-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Richard Henderson <address@hidden>
> ---
> include/exec/cpu-all.h | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
> index d2d443c4f9..e0c8dc540c 100644
> --- a/include/exec/cpu-all.h
> +++ b/include/exec/cpu-all.h
> @@ -317,20 +317,24 @@ CPUArchState *cpu_copy(CPUArchState *env);
>
> #if !defined(CONFIG_USER_ONLY)
>
> -/* Flags stored in the low bits of the TLB virtual address. These are
> - * defined so that fast path ram access is all zeros.
> +/*
> + * Flags stored in the low bits of the TLB virtual address.
> + * These are defined so that fast path ram access is all zeros.
> * The flags all must be between TARGET_PAGE_BITS and
> * maximum address alignment bit.
> + *
> + * Use TARGET_PAGE_BITS_MIN so that these bits are constant
> + * when TARGET_PAGE_BITS_VARY is in effect.
> */
> /* Zero if TLB entry is valid. */
> -#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS - 1))
> +#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1))
> /* Set if TLB entry references a clean RAM page. The iotlb entry will
> contain the page physical address. */
> -#define TLB_NOTDIRTY (1 << (TARGET_PAGE_BITS - 2))
> +#define TLB_NOTDIRTY (1 << (TARGET_PAGE_BITS_MIN - 2))
> /* Set if TLB entry is an IO callback. */
> -#define TLB_MMIO (1 << (TARGET_PAGE_BITS - 3))
> +#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 3))
> /* Set if TLB entry contains a watchpoint. */
> -#define TLB_WATCHPOINT (1 << (TARGET_PAGE_BITS - 4))
> +#define TLB_WATCHPOINT (1 << (TARGET_PAGE_BITS_MIN - 4))
>
> /* Use this mask to check interception with an alignment mask
> * in a TCG backend.
>
Reviewed-by: David Hildenbrand <address@hidden>
--
Thanks,
David / dhildenb
- [PATCH v3 00/20] Move rom and notdirty handling to cputlb, Richard Henderson, 2019/09/21
- [PATCH v3 01/20] exec: Use TARGET_PAGE_BITS_MIN for TLB flags, Richard Henderson, 2019/09/21
- Re: [PATCH v3 01/20] exec: Use TARGET_PAGE_BITS_MIN for TLB flags,
David Hildenbrand <=
- [PATCH v3 02/20] exec: Split out variable page size support to exec-vary.c, Richard Henderson, 2019/09/21
- [PATCH v3 04/20] exec: Restrict TARGET_PAGE_BITS_VARY assert to CONFIG_DEBUG_TCG, Richard Henderson, 2019/09/21
- [PATCH v3 03/20] exec: Use const alias for TARGET_PAGE_BITS_VARY, Richard Henderson, 2019/09/21
- [PATCH v3 05/20] exec: Promote TARGET_PAGE_MASK to target_long, Richard Henderson, 2019/09/21
- [PATCH v3 06/20] exec: Tidy TARGET_PAGE_ALIGN, Richard Henderson, 2019/09/21
- [PATCH v3 07/20] exec: Cache TARGET_PAGE_MASK for TARGET_PAGE_BITS_VARY, Richard Henderson, 2019/09/21