X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/48cef39bf39846ce4aaf79d4a2ae620373b3e181..2cbe2de5454cf9af44b620b2b40d56361a12a45f:/target/i386/helper.c diff --git a/target/i386/helper.c b/target/i386/helper.c index e2af3404f2..ee7eff2f6f 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -326,6 +326,10 @@ void x86_cpu_dump_local_apic_state(CPUState *cs, FILE *f, { X86CPU *cpu = X86_CPU(cs); APICCommonState *s = APIC_COMMON(cpu->apic_state); + if (!s) { + cpu_fprintf(f, "local apic state not available\n"); + return; + } uint32_t *lvt = s->lvt; cpu_fprintf(f, "dumping local APIC state for CPU %-2u\n\n", @@ -1208,7 +1212,7 @@ static void do_inject_x86_mce(CPUState *cs, run_on_cpu_data data) " triple fault\n", cs->cpu_index); qemu_log_mask(CPU_LOG_RESET, "Triple fault\n"); - qemu_system_reset_request(); + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); return; } if (banks[1] & MCI_STATUS_VAL) {