diff mbox series

[1/2] exec-all: document that tlb_fill can trigger a TLB resize

Message ID 20190209162745.12668-2-cota@braap.org
State New
Headers show
Series [1/2] exec-all: document that tlb_fill can trigger a TLB resize | expand

Commit Message

Emilio Cota Feb. 9, 2019, 4:27 p.m. UTC
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 include/exec/exec-all.h | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Alex Bennée Feb. 9, 2019, 8:48 p.m. UTC | #1
Emilio G. Cota <cota@braap.org> writes:

> Signed-off-by: Emilio G. Cota <cota@braap.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  include/exec/exec-all.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
> index aa7b81aaf0..97b90cb0db 100644
> --- a/include/exec/exec-all.h
> +++ b/include/exec/exec-all.h
> @@ -475,6 +475,11 @@ static inline void assert_no_pages_locked(void)
>  struct MemoryRegionSection *iotlb_to_section(CPUState *cpu,
>                                               hwaddr index, MemTxAttrs attrs);
>
> +/*
> + * 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()).
> + */
>  void tlb_fill(CPUState *cpu, target_ulong addr, int size,
>                MMUAccessType access_type, int mmu_idx, uintptr_t retaddr);


--
Alex Bennée
diff mbox series

Patch

diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index aa7b81aaf0..97b90cb0db 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -475,6 +475,11 @@  static inline void assert_no_pages_locked(void)
 struct MemoryRegionSection *iotlb_to_section(CPUState *cpu,
                                              hwaddr index, MemTxAttrs attrs);
 
+/*
+ * 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()).
+ */
 void tlb_fill(CPUState *cpu, target_ulong addr, int size,
               MMUAccessType access_type, int mmu_idx, uintptr_t retaddr);