qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/1] Do not stop guest when panic event is received


From: Alejandro Jimenez
Subject: [PATCH 0/1] Do not stop guest when panic event is received
Date: Thu, 1 Oct 2020 22:41:33 -0400

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]