qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: deller@kernel.org, peter.maydell@linaro.org,
	alex.bennee@linaro.org, linux-parisc@vger.kernel.org,
	qemu-arm@nongnu.org
Subject: Re: [PATCH v2 02/21] accel/tcg: Expand tlb_fill for 3 callers
Date: Mon, 7 Oct 2024 23:01:23 +0200	[thread overview]
Message-ID: <c9bf746f-d4db-43f4-a7ad-628ffd9669f6@gmx.de> (raw)
In-Reply-To: <20241005200600.493604-3-richard.henderson@linaro.org>

On 10/5/24 22:05, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Helge Deller <deller@gmx.de>

> ---
>   accel/tcg/cputlb.c | 33 ++++++++++-----------------------
>   1 file changed, 10 insertions(+), 23 deletions(-)
>
> diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> index fd6459b695..58960969f4 100644
> --- a/accel/tcg/cputlb.c
> +++ b/accel/tcg/cputlb.c
> @@ -1220,25 +1220,6 @@ void tlb_set_page(CPUState *cpu, vaddr addr,
>                               prot, mmu_idx, size);
>   }
>
> -/*
> - * Note: tlb_fill() can trigger a resize of the TLB. This means that all of the
> - * caller's prior references to the TLB table (e.g. CPUTLBEntry pointers) must
> - * be discarded and looked up again (e.g. via tlb_entry()).
> - */
> -static void tlb_fill(CPUState *cpu, vaddr addr, int size,
> -                     MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
> -{
> -    bool ok;
> -
> -    /*
> -     * This is not a probe, so only valid return is success; failure
> -     * should result in exception + longjmp to the cpu loop.
> -     */
> -    ok = cpu->cc->tcg_ops->tlb_fill(cpu, addr, size,
> -                                    access_type, mmu_idx, false, retaddr);
> -    assert(ok);
> -}
> -
>   static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
>                                           MMUAccessType access_type,
>                                           int mmu_idx, uintptr_t retaddr)
> @@ -1631,7 +1612,10 @@ static bool mmu_lookup1(CPUState *cpu, MMULookupPageData *data,
>       if (!tlb_hit(tlb_addr, addr)) {
>           if (!victim_tlb_hit(cpu, mmu_idx, index, access_type,
>                               addr & TARGET_PAGE_MASK)) {
> -            tlb_fill(cpu, addr, data->size, access_type, mmu_idx, ra);
> +            bool ok = cpu->cc->tcg_ops->tlb_fill(cpu, addr, data->size,
> +                                                 access_type, mmu_idx,
> +                                                 false, ra);
> +            assert(ok);
>               maybe_resized = true;
>               index = tlb_index(cpu, mmu_idx, addr);
>               entry = tlb_entry(cpu, mmu_idx, addr);
> @@ -1833,8 +1817,10 @@ static void *atomic_mmu_lookup(CPUState *cpu, vaddr addr, MemOpIdx oi,
>       if (!tlb_hit(tlb_addr, addr)) {
>           if (!victim_tlb_hit(cpu, mmu_idx, index, MMU_DATA_STORE,
>                               addr & TARGET_PAGE_MASK)) {
> -            tlb_fill(cpu, addr, size,
> -                     MMU_DATA_STORE, mmu_idx, retaddr);
> +            bool ok = cpu->cc->tcg_ops->tlb_fill(cpu, addr, size,
> +                                                 MMU_DATA_STORE, mmu_idx,
> +                                                 false, retaddr);
> +            assert(ok);
>               index = tlb_index(cpu, mmu_idx, addr);
>               tlbe = tlb_entry(cpu, mmu_idx, addr);
>           }
> @@ -1848,7 +1834,8 @@ static void *atomic_mmu_lookup(CPUState *cpu, vaddr addr, MemOpIdx oi,
>        * but addr_read will only be -1 if PAGE_READ was unset.
>        */
>       if (unlikely(tlbe->addr_read == -1)) {
> -        tlb_fill(cpu, addr, size, MMU_DATA_LOAD, mmu_idx, retaddr);
> +        cpu->cc->tcg_ops->tlb_fill(cpu, addr, size, MMU_DATA_LOAD,
> +                                   mmu_idx, false, retaddr);
>           /*
>            * Since we don't support reads and writes to different
>            * addresses, and we do have the proper page loaded for



  reply	other threads:[~2024-10-07 21:02 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-05 20:05 [PATCH v2 00/21] accel/tcg: Introduce tlb_fill_align hook Richard Henderson
2024-10-05 20:05 ` [PATCH v2 01/21] accel/tcg: Assert noreturn from write-only page for atomics Richard Henderson
2024-10-07 20:58   ` Helge Deller
2024-10-08 14:04   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 02/21] accel/tcg: Expand tlb_fill for 3 callers Richard Henderson
2024-10-07 21:01   ` Helge Deller [this message]
2024-10-08 14:04   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 03/21] include/exec/memop: Move get_alignment_bits from tcg.h Richard Henderson
2024-10-07 21:02   ` Helge Deller
2024-10-08 14:04   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 04/21] include/exec/memop: Rename get_alignment_bits Richard Henderson
2024-10-07 21:03   ` Helge Deller
2024-10-08 14:05   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 05/21] include/exec/memop: Introduce memop_atomicity_bits Richard Henderson
2024-10-07 21:04   ` Helge Deller
2024-10-08 14:05   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 06/21] hw/core/tcg-cpu-ops: Introduce tlb_fill_align hook Richard Henderson
2024-10-07 21:09   ` Helge Deller
2024-10-08 14:12   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 07/21] accel/tcg: Use the " Richard Henderson
2024-10-07 21:13   ` Helge Deller
2024-10-08 14:12   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 08/21] target/hppa: Add MemOp argument to hppa_get_physical_address Richard Henderson
2024-10-07 21:14   ` Helge Deller
2024-10-05 20:05 ` [PATCH v2 09/21] target/hppa: Perform access rights before protection id check Richard Henderson
2024-10-07 21:15   ` Helge Deller
2024-10-05 20:05 ` [PATCH v2 10/21] target/hppa: Fix priority of T, D, and B page faults Richard Henderson
2024-10-07 21:16   ` Helge Deller
2024-10-05 20:05 ` [PATCH v2 11/21] target/hppa: Handle alignment faults in hppa_get_physical_address Richard Henderson
2024-10-07 21:18   ` Helge Deller
2024-10-05 20:05 ` [PATCH v2 12/21] target/hppa: Add hppa_cpu_tlb_fill_align Richard Henderson
2024-10-07 21:19   ` Helge Deller
2024-10-05 20:05 ` [PATCH v2 13/21] target/arm: Pass MemOp to get_phys_addr Richard Henderson
2024-10-07 21:20   ` Helge Deller
2024-10-08 14:45   ` Peter Maydell
2024-10-08 17:32     ` Richard Henderson
2024-10-09 13:59       ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 14/21] target/arm: Pass MemOp to get_phys_addr_with_space_nogpc Richard Henderson
2024-10-07 21:21   ` Helge Deller
2024-10-08 14:35   ` Peter Maydell
2024-10-08 17:50     ` Richard Henderson
2024-10-05 20:05 ` [PATCH v2 15/21] target/arm: Pass MemOp to get_phys_addr_gpc Richard Henderson
2024-10-07 21:21   ` Helge Deller
2024-10-08 14:26   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 16/21] target/arm: Pass MemOp to get_phys_addr_nogpc Richard Henderson
2024-10-07 21:22   ` Helge Deller
2024-10-08 14:25   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 17/21] target/arm: Pass MemOp through get_phys_addr_twostage Richard Henderson
2024-10-07 21:22   ` Helge Deller
2024-10-08 14:24   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 18/21] target/arm: Pass MemOp to get_phys_addr_lpae Richard Henderson
2024-10-07 21:23   ` Helge Deller
2024-10-08 14:24   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 19/21] target/arm: Move device detection earlier in get_phys_addr_lpae Richard Henderson
2024-10-07 21:25   ` Helge Deller
2024-10-08 14:22   ` Peter Maydell
2024-10-05 20:05 ` [PATCH v2 20/21] target/arm: Add arm_cpu_tlb_fill_align Richard Henderson
2024-10-07 21:26   ` Helge Deller
2024-10-08 14:22   ` Peter Maydell
2024-10-05 20:06 ` [PATCH v2 21/21] target/arm: Fix alignment fault priority in get_phys_addr_lpae Richard Henderson
2024-10-08 14:23   ` Peter Maydell
2024-10-07 20:55 ` [PATCH v2 00/21] accel/tcg: Introduce tlb_fill_align hook Helge Deller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9bf746f-d4db-43f4-a7ad-628ffd9669f6@gmx.de \
    --to=deller@gmx.de \
    --cc=alex.bennee@linaro.org \
    --cc=deller@kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).