qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Do not stop guest when panic event is received
@ 2020-10-02  2:41 Alejandro Jimenez
  2020-10-02  2:41 ` [PATCH 1/1] vl: Add -no-panicstop option Alejandro Jimenez
  2020-10-20 17:14 ` [PATCH 0/1] Do not stop guest when panic event is received Paolo Bonzini
  0 siblings, 2 replies; 5+ messages in thread
From: Alejandro Jimenez @ 2020-10-02  2:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini

The following patch adds an option to request that QEMU does not stop the VM when a panic event is received.
This allows guests in cloud environments to report the panic condition to the control plane, but be able to
proceed to collect a crash dump and automatically reboot, without waiting to receive one or several 'cont'
monitor commands.

I am aware of a previous discussion regarding the decision to stop the guest on panic event:
https://lore.kernel.org/qemu-devel/52148F88.5000509@redhat.com/
that is why I propose explicitly using a parameter to change the default behavior when necessary.

The PVPANIC_CRASHLOADED event was introduced in the v5.6 kernel, and it is intended to tell QEMU that the guest
will handle the panic condition by itself, but unfortunately older kernels will only support sending the
PVPANIC_PANICKED event, for which the default behavior is to pause the VM.

Having a '-no-panicstop' option allows for older guest kernels that do not support the PVPANIC_CRASHLOADED event
to behave in the same way as newer kernels, simplifying control plane code. It also provides the same advantage
when launching Windows guests with the hv-crash enlightenment, since the hv-crash MSR writes are ultimately
handled by QEMU as if the guest had sent a PVPANIC_PANICKED event.

The fact that the behavior of hv-crash is also affected is why I chose to implement this change as an independent
option, as opposed to making it a property of the pvpanic device (e.g. -device pvpanic,no-panicstop).

Please let me know if you have any comments or suggestions.

Regards,
Alejandro

Alejandro Jimenez (1):
  vl: Add -no-panicstop option

 qemu-options.hx | 11 +++++++++++
 softmmu/vl.c    | 17 ++++++++++++++---
 2 files changed, 25 insertions(+), 3 deletions(-)

-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-21 13:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-02  2:41 [PATCH 0/1] Do not stop guest when panic event is received Alejandro Jimenez
2020-10-02  2:41 ` [PATCH 1/1] vl: Add -no-panicstop option Alejandro Jimenez
2020-10-20 17:14 ` [PATCH 0/1] Do not stop guest when panic event is received Paolo Bonzini
2020-10-21 13:26   ` Alejandro Jimenez
2020-10-21 13:33     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).