[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 11/55] cputlb: document get_page_addr_code
From: |
Alex Bennée |
Subject: |
[PATCH v5 11/55] cputlb: document get_page_addr_code |
Date: |
Mon, 14 Oct 2019 11:49:04 +0100 |
From: "Emilio G. Cota" <address@hidden>
Suggested-by: Alex Bennée <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
---
include/exec/exec-all.h | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 49db07ba0b..6352316de1 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -487,7 +487,15 @@ void mmap_lock(void);
void mmap_unlock(void);
bool have_mmap_lock(void);
-static inline tb_page_addr_t get_page_addr_code(CPUArchState *env1,
target_ulong addr)
+/**
+ * get_page_addr_code() - user-mode version
+ * @env: CPUArchState
+ * @addr: guest virtual address of guest code
+ *
+ * Returns @addr.
+ */
+static inline tb_page_addr_t get_page_addr_code(CPUArchState *env,
+ target_ulong addr)
{
return addr;
}
@@ -495,8 +503,18 @@ static inline tb_page_addr_t
get_page_addr_code(CPUArchState *env1, target_ulong
static inline void mmap_lock(void) {}
static inline void mmap_unlock(void) {}
-/* cputlb.c */
-tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr);
+/**
+ * get_page_addr_code() - full-system version
+ * @env: CPUArchState
+ * @addr: guest virtual address of guest code
+ *
+ * If we cannot translate and execute from the entire RAM page, or if
+ * the region is not backed by RAM, returns -1. Otherwise, returns the
+ * ram_addr_t corresponding to the guest code at @addr.
+ *
+ * Note: this function can trigger an exception.
+ */
+tb_page_addr_t get_page_addr_code(CPUArchState *env, target_ulong addr);
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length);
void tlb_set_dirty(CPUState *cpu, target_ulong vaddr);
--
2.20.1
- [PATCH for 4.2 v5 00/55] Support for TCG plugins, Alex Bennée, 2019/10/14
- [PATCH v5 01/55] trace: expand mem_info:size_shift to 4 bits, Alex Bennée, 2019/10/14
- [PATCH v5 04/55] translate-all: use cpu_in_exclusive_work_context() in tb_flush, Alex Bennée, 2019/10/14
- [PATCH v5 05/55] docs/devel: add plugins.rst design document, Alex Bennée, 2019/10/14
- [PATCH v5 03/55] cpu: introduce cpu_in_exclusive_context(), Alex Bennée, 2019/10/14
- [PATCH v5 06/55] configure: add --enable-plugins (MOVE TO END), Alex Bennée, 2019/10/14
- [PATCH v5 02/55] trace: add mmu_index to mem_info, Alex Bennée, 2019/10/14
- [PATCH v5 09/55] plugin: add implementation of the api, Alex Bennée, 2019/10/14
- [PATCH v5 10/55] queue: add QTAILQ_REMOVE_SEVERAL, Alex Bennée, 2019/10/14
- [PATCH v5 07/55] plugin: add user-facing API, Alex Bennée, 2019/10/14
- [PATCH v5 11/55] cputlb: document get_page_addr_code,
Alex Bennée <=
- [PATCH v5 24/55] target/arm: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 22/55] plugin-gen: add plugin_insn_append, Alex Bennée, 2019/10/14
- [PATCH v5 15/55] atomic_template: add inline trace/plugin helpers, Alex Bennée, 2019/10/14
- [PATCH v5 20/55] *-user: plugin syscalls, Alex Bennée, 2019/10/14
- [PATCH v5 25/55] target/ppc: fetch code with translator_ld, Alex Bennée, 2019/10/14
- [PATCH v5 12/55] cputlb: introduce get_page_addr_code_hostp, Alex Bennée, 2019/10/14
- [PATCH v5 50/55] include/exec: wrap cpu_ldst.h in CONFIG_TCG, Alex Bennée, 2019/10/14
- [PATCH v5 21/55] cpu: hook plugin vcpu events, Alex Bennée, 2019/10/14
- [PATCH v5 37/55] vl: support -plugin option, Alex Bennée, 2019/10/14
- [PATCH v5 40/55] tests/tcg/Makefile.target: fix path to config-host.mak, Alex Bennée, 2019/10/14