]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
accel/tcg: Move user-only tlb_vaddr_to_host out of line
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 30 Apr 2025 23:54:31 +0000 (16:54 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 5 May 2025 16:24:10 +0000 (09:24 -0700)
At the same time, fix a mis-match between user and system
by using vaddr not abi_ptr for the address parameter.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/user-exec.c
include/accel/tcg/cpu-ldst.h

index e1f4c4eacf48ca46697727ac7438cfebd56bd9c8..adc5296ba5a8f0ff45702d513ce6b0f9d77845ed 100644 (file)
@@ -850,6 +850,12 @@ void *probe_access(CPUArchState *env, vaddr addr, int size,
     return size ? g2h(env_cpu(env), addr) : NULL;
 }
 
+void *tlb_vaddr_to_host(CPUArchState *env, vaddr addr,
+                        MMUAccessType access_type, int mmu_idx)
+{
+    return g2h(env_cpu(env), addr);
+}
+
 tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env, vaddr addr,
                                         void **hostp)
 {
index 44a62b54dae5983477149bdaf00306929df81ea5..00e6419e1383d917af65ed9dceab2a33fef16077 100644 (file)
@@ -515,15 +515,7 @@ static inline uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr)
  * Otherwise (TLB entry is for an I/O access, guest software
  * TLB fill required, etc) return NULL.
  */
-#ifdef CONFIG_USER_ONLY
-static inline void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr,
-                                      MMUAccessType access_type, int mmu_idx)
-{
-    return g2h(env_cpu(env), addr);
-}
-#else
 void *tlb_vaddr_to_host(CPUArchState *env, vaddr addr,
                         MMUAccessType access_type, int mmu_idx);
-#endif
 
 #endif /* ACCEL_TCG_CPU_LDST_H */