Skip to contentSkip to conversation

cpus: Do not dump CPU state when calling hw_error()

PATCH New Philippe Mathieu-Daudé 1 participant 1 message Oct 1, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cpus: Do not dump CPU state when calling hw_error()

Dumping the state of all CPUs is not helpful in any of the contexts where hw_error() is used.
We already have cpu_abort() to dump CPU states and abort.

Restrict hw_error() to peripheral errors, hoping we can completely remove it by proper functions from "error-report.h" in the future.

---
 softmmu/cpus.c | 5 -----
 1 file changed, 5 deletions(-)
softmmu/cpus.c +0 -5
index ac8940d52e..da45cbf989 100644
@@ -913,16 +913,11 @@ static void stop_tcg_kick_timer(void)
 void hw_error(const char *fmt, ...)
 {
     va_list ap;
-    CPUState *cpu;
 
     va_start(ap, fmt);
     fprintf(stderr, "qemu: hardware error: ");
     vfprintf(stderr, fmt, ap);
     fprintf(stderr, "\n");
-    CPU_FOREACH(cpu) {
-        fprintf(stderr, "CPU #%d:\n", cpu->cpu_index);
-        cpu_dump_state(cpu, stderr, CPU_DUMP_FPU);
-    }
     va_end(ap);
     abort();
 }
Signature · 1 line
2.26.2