[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 26/73] cputlb: document get_page_addr_code
From: |
Alex Bennée |
Subject: |
[PULL v2 26/73] cputlb: document get_page_addr_code |
Date: |
Fri, 25 Oct 2019 07:36:26 +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>
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 04795c49bf4..e4206cb1735 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -504,7 +504,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;
}
@@ -512,8 +520,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
- [PULL v2 64/73] tests/tcg: enable plugin testing, (continued)
- [PULL v2 64/73] tests/tcg: enable plugin testing, Alex Bennée, 2019/10/25
- [PULL v2 14/73] travis.yml: --enable-debug-tcg to check-tcg, Alex Bennée, 2019/10/25
- [PULL v2 33/73] translate-all: notify plugin code of tb_flush, Alex Bennée, 2019/10/25
- [PULL v2 66/73] tests/plugin: add instruction execution breakdown, Alex Bennée, 2019/10/25
- [PULL v2 51/73] translator: inject instrumentation from plugins, Alex Bennée, 2019/10/25
- [PULL v2 61/73] tests/tcg: set QEMU_OPTS for all cris runs, Alex Bennée, 2019/10/25
- [PULL v2 39/73] translator: add translator_ld{ub,sw,uw,l,q}, Alex Bennée, 2019/10/25
- [PULL v2 68/73] accel/stubs: reduce headers from tcg-stub, Alex Bennée, 2019/10/25
- [PULL v2 47/73] target/riscv: fetch code with translator_ld, Alex Bennée, 2019/10/25
- [PULL v2 16/73] tests/docker: update Travis image to a more current version, Alex Bennée, 2019/10/25
- [PULL v2 26/73] cputlb: document get_page_addr_code,
Alex Bennée <=
- [PULL v2 23/73] plugin: add core code, Alex Bennée, 2019/10/25
- [PULL v2 73/73] travis.yml: enable linux-gcc-debug-tcg cache, Alex Bennée, 2019/10/25
- [PULL v2 29/73] plugin-gen: add module for TCG-related code, Alex Bennée, 2019/10/25
- Re: [PULL v2 00/73] tcg plugins and testing updates, Markus Armbruster, 2019/10/25
Re: [PULL v2 00/73] tcg plugins and testing updates, Peter Maydell, 2019/10/25