[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 03/19] exec-all.h: Document tlb_set_page_with_att
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PATCH v3 03/19] exec-all.h: Document tlb_set_page_with_attrs, tlb_set_page |
Date: |
Thu, 14 Jan 2016 13:52:39 +0000 |
Add documentation comments for tlb_set_page_with_attrs()
and tlb_set_page().
Signed-off-by: Peter Maydell <address@hidden>
Acked-by: Edgar E. Iglesias <address@hidden>
---
include/exec/exec-all.h | 34 +++++++++++++++++++++++++++++++---
1 file changed, 31 insertions(+), 3 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 9be0165..caa78a9 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -144,12 +144,40 @@ void tlb_flush_page_by_mmuidx(CPUState *cpu, target_ulong
addr, ...);
* MMU indexes.
*/
void tlb_flush_by_mmuidx(CPUState *cpu, ...);
-void tlb_set_page(CPUState *cpu, target_ulong vaddr,
- hwaddr paddr, int prot,
- int mmu_idx, target_ulong size);
+/**
+ * tlb_set_page_with_attrs:
+ * @cpu: CPU to add this TLB entry for
+ * @vaddr: virtual address of page to add entry for
+ * @paddr: physical address of the page
+ * @attrs: memory transaction attributes
+ * @prot: access permissions (PAGE_READ/PAGE_WRITE/PAGE_EXEC bits)
+ * @mmu_idx: MMU index to insert TLB entry for
+ * @size: size of the page in bytes
+ *
+ * Add an entry to this CPU's TLB (a mapping from virtual address
+ * @vaddr to physical address @paddr) with the specified memory
+ * transaction attributes. This is generally called by the target CPU
+ * specific code after it has been called through the tlb_fill()
+ * entry point and performed a successful page table walk to find
+ * the physical address and attributes for the virtual address
+ * which provoked the TLB miss.
+ *
+ * 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.
+ */
void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
hwaddr paddr, MemTxAttrs attrs,
int prot, int mmu_idx, target_ulong size);
+/* tlb_set_page:
+ *
+ * This function is equivalent to calling tlb_set_page_with_attrs()
+ * with an @attrs argument of MEMTXATTRS_UNSPECIFIED. It's provided
+ * as a convenience for CPUs which don't use memory transaction attributes.
+ */
+void tlb_set_page(CPUState *cpu, target_ulong vaddr,
+ hwaddr paddr, int prot,
+ int mmu_idx, target_ulong size);
void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr);
void probe_write(CPUArchState *env, target_ulong addr, int mmu_idx,
uintptr_t retaddr);
--
1.9.1
- [Qemu-devel] [PATCH v3 00/19] Add support for multiple address spaces per CPU and use it for ARM TrustZone, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 03/19] exec-all.h: Document tlb_set_page_with_attrs, tlb_set_page,
Peter Maydell <=
- [Qemu-devel] [PATCH v3 17/19] hw/arm/virt: Wire up memory region to CPUs explicitly, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 07/19] exec.c: Pass MemTxAttrs to iotlb_to_region so it uses the right AS, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 02/19] exec.c: Allow target CPUs to define multiple AddressSpaces, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 10/19] exec.c: Use correct AddressSpace in watch_mem_read and watch_mem_write, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 12/19] qom/cpu: Add MemoryRegion property, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 19/19] HACK: rearrange the virt memory map to suit OP-TEE, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 01/19] exec.c: Don't set cpu->as until cpu_address_space_init, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 09/19] exec.c: Use cpu_get_phys_page_attrs_debug, Peter Maydell, 2016/01/14
- [Qemu-devel] [PATCH v3 06/19] cputlb.c: Use correct address space when looking up MemoryRegionSection, Peter Maydell, 2016/01/14