From 1b44fd94acfbd009149b721a2e1b00ecc018f6a9 Mon Sep 17 00:00:00 2001 From: "Emilio G. Cota" Date: Tue, 12 Feb 2019 11:38:18 -0500 Subject: [PATCH] exec-all: document that tlb_fill can trigger a TLB resize Backports commit ae56a2ff92ac73782279abf8857585c34b15f509 from qemu --- qemu/include/exec/exec-all.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qemu/include/exec/exec-all.h b/qemu/include/exec/exec-all.h index feed4fc6..00f522bf 100644 --- a/qemu/include/exec/exec-all.h +++ b/qemu/include/exec/exec-all.h @@ -336,6 +336,11 @@ void phys_mem_set_alloc(void *(*alloc)(size_t, uint64_t *align)); 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); #endif