[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/62] accel/tcg: Introduce PageEntryExtra
From: |
Peter Maydell |
Subject: |
Re: [PATCH 01/62] accel/tcg: Introduce PageEntryExtra |
Date: |
Mon, 4 Jul 2022 16:28:02 +0100 |
On Sun, 3 Jul 2022 at 09:25, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Add an optional structure, controlled by TARGET_PAGE_ENTRY_EXTRA,
> that allows arbitrary extra data to be saved in the TLB for a
> given page. Set it with tlb_set_page_with_extra() and fetch it
> with probe_access_extra().
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> -/* Add a new TLB entry. At most one entry for a given virtual address
> +/*
> + * Add a new TLB entry. At most one entry for a given virtual address
> * is permitted. Only a single TARGET_PAGE_SIZE region is mapped, the
> * supplied size is only used by tlb_flush_page.
> *
> * Called from TCG-generated code, which is under an RCU read-side
> * critical section.
> + *
> + * Returns a pointer to the iotlb entry, with env_tlb(env)->c.lock
> + * still locked, for final additions to the iotlb entry. The caller
> + * must unlock the lock.
> */
> -void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
> - hwaddr paddr, MemTxAttrs attrs, int prot,
> - int mmu_idx, target_ulong size)
> +void tlb_set_page_with_extra(CPUState *cpu, target_ulong vaddr, hwaddr paddr,
> + MemTxAttrs attrs, PageEntryExtra extra,
> + int prot, int mmu_idx, target_ulong size)
The comment claims it returns a pointer to the iotlb entry, but
the code says it returns void... leftover from a previous design?
> {
> CPUArchState *env = cpu->env_ptr;
> CPUTLB *tlb = env_tlb(env);
-- PMM
- [PATCH 00/62] target/arm: Implement FEAT_HAFDBS, Richard Henderson, 2022/07/03
- [PATCH 01/62] accel/tcg: Introduce PageEntryExtra, Richard Henderson, 2022/07/03
- Re: [PATCH 01/62] accel/tcg: Introduce PageEntryExtra,
Peter Maydell <=
- [PATCH 02/62] target/arm: Enable PageEntryExtra, Richard Henderson, 2022/07/03
- [PATCH 03/62] target/arm: Fix MTE check in sve_ldnfff1_r, Richard Henderson, 2022/07/03
- [PATCH 04/62] target/arm: Record tagged bit for user-only in sve_probe_page, Richard Henderson, 2022/07/03
- [PATCH 06/62] target/arm: Use PageEntryExtra for BTI, Richard Henderson, 2022/07/03