Re: [PATCH v2 1/3] runstate: set crash_occurred on guest crashloaded

Zhengrong Li <[email protected]> Wed, 05 Aug 2026 20:10:10 +0800
Newsgroups gmane.comp.emulators.qemu
Message-ID <[email protected]>
Hi Philippe,

Thanks for the review.

I followed the existing pattern in qemu_system_guest_panicked(),
which already sets crash_occurred on current_cpu when a guest
panic is reported. The intent was to keep the panicked and
crash-loaded paths consistent.

Putting it in the generic function also means any future crash
notification mechanism (beyond pvpanic) would automatically
benefit from identifying the faulting CPU in guest dumps.

I agree the original commit bac05aa9a77 ("cpu: Add crash_occurred
flag into CPUState") doesn't explain the design choice well.

If you prefer moving it to handle_event() in the caller, I'm
happy to adjust. What do you think?

Regards,
Zhengrong Li