[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v10 14/23] cputlb: tweak qemu_ram_addr_from_host_nof
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v10 14/23] cputlb: tweak qemu_ram_addr_from_host_nofail reporting |
Date: |
Mon, 6 Feb 2017 15:31:04 +0000 |
This moves the helper function closer to where it is called and updates
the error message to report via error_report instead of the deprecated
fprintf.
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
---
cputlb.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/cputlb.c b/cputlb.c
index af0e65cd2c..94fa9977c5 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -246,18 +246,6 @@ void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry,
uintptr_t start,
}
}
-static inline ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr)
-{
- ram_addr_t ram_addr;
-
- ram_addr = qemu_ram_addr_from_host(ptr);
- if (ram_addr == RAM_ADDR_INVALID) {
- fprintf(stderr, "Bad ram pointer %p\n", ptr);
- abort();
- }
- return ram_addr;
-}
-
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length)
{
CPUArchState *env;
@@ -469,6 +457,18 @@ static void report_bad_exec(CPUState *cpu, target_ulong
addr)
log_cpu_state_mask(LOG_GUEST_ERROR, cpu, CPU_DUMP_FPU | CPU_DUMP_CCOP);
}
+static inline ram_addr_t qemu_ram_addr_from_host_nofail(void *ptr)
+{
+ ram_addr_t ram_addr;
+
+ ram_addr = qemu_ram_addr_from_host(ptr);
+ if (ram_addr == RAM_ADDR_INVALID) {
+ error_report("Bad ram pointer %p", ptr);
+ abort();
+ }
+ return ram_addr;
+}
+
/* NOTE: this function can trigger an exception */
/* NOTE2: the returned address is not exactly the physical address: it
* is actually a ram_addr_t (in system mode; the user mode emulation
--
2.11.0
- [Qemu-devel] [PATCH v10 02/23] mttcg: translate-all: Enable locking debug in a debug build, (continued)
- [Qemu-devel] [PATCH v10 02/23] mttcg: translate-all: Enable locking debug in a debug build, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 07/23] tcg: rename tcg_current_cpu to tcg_current_rr_cpu, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 06/23] tcg: add kick timer for single-threaded vCPU emulation, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 10/23] tcg: enable tb_lock() for SoftMMU, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 05/23] tcg: add options for enabling MTTCG, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 12/23] tcg: handle EXCP_ATOMIC exception for system emulation, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 09/23] tcg: remove global exit_request, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 08/23] tcg: drop global lock during TCG code execution, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 13/23] cputlb: add assert_cpu_is_self checks, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 11/23] tcg: enable thread-per-vCPU, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 14/23] cputlb: tweak qemu_ram_addr_from_host_nofail reporting,
Alex Bennée <=
- [Qemu-devel] [PATCH v10 17/23] cputlb: add tlb_flush_by_mmuidx async routines, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 15/23] cputlb: introduce tlb_flush_* async work., Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 18/23] cputlb: atomically update tlb fields used by tlb_reset_dirty, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 16/23] cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 19/23] cputlb: introduce tlb_flush_*_all_cpus[_synced], Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 23/23] tcg: enable MTTCG by default for ARM on x86 hosts, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 21/23] target-arm: don't generate WFE/YIELD calls for MTTCG, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 22/23] target-arm: ensure all cross vCPUs TLB flushes complete, Alex Bennée, 2017/02/06
- [Qemu-devel] [PATCH v10 20/23] target-arm/powerctl: defer cpu reset work to CPU context, Alex Bennée, 2017/02/06