[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-cpu 09/59] cpus: Simplify hw_error()
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-cpu 09/59] cpus: Simplify hw_error() |
Date: |
Sun, 9 Jun 2013 21:12:36 +0200 |
Use new qemu_for_each_cpu().
Signed-off-by: Andreas Färber <address@hidden>
---
cpus.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/cpus.c b/cpus.c
index 1975c5c..9195bc3 100644
--- a/cpus.c
+++ b/cpus.c
@@ -386,21 +386,22 @@ void configure_icount(const char *option)
}
/***********************************************************/
+
+static void hw_one_error(CPUState *cpu, void *data)
+{
+ fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
+ cpu_dump_state(cpu->env_ptr, stderr, fprintf, CPU_DUMP_FPU);
+}
+
void hw_error(const char *fmt, ...)
{
va_list ap;
- CPUArchState *env;
- CPUState *cpu;
va_start(ap, fmt);
fprintf(stderr, "qemu: hardware error: ");
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
- for (env = first_cpu; env != NULL; env = env->next_cpu) {
- cpu = ENV_GET_CPU(env);
- fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
- cpu_dump_state(env, stderr, fprintf, CPU_DUMP_FPU);
- }
+ qemu_for_each_cpu(hw_one_error, NULL);
va_end(ap);
abort();
}
--
1.8.1.4
- Re: [Qemu-devel] [PATCH qom-cpu 02/59] kvm: Change cpu_synchronize_state() argument to CPUState, (continued)
- [Qemu-devel] [PATCH qom-cpu 05/59] cpus: Simplify pause_all_vcpus(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 06/59] cpus: Simplify resume_all_vcpus(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 07/59] cpus: Simplify set_numa_modes(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 08/59] cpus: Simplify qmp_inject_nmi(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 09/59] cpus: Simplify hw_error(),
Andreas Färber <=
- [Qemu-devel] [PATCH qom-cpu 10/59] cpus: Simplify qemu_tcg_wait_io_event() and qemu_tcg_cpu_thread_fn(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 11/59] monitor: Simplify do_inject_mce(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 12/59] gdbstub: Simplify find_cpu(), Andreas Färber, 2013/06/09
- [Qemu-devel] [PATCH qom-cpu 14/59] cpus: Change cpu_thread_is_idle() argument to CPUState, Andreas Färber, 2013/06/09