The pvpanic mess is even bigger than anticipated. Let's fix the monitor's
behavior (patch 1), get rid of all traces that the broken pvpanic existed
(patch 2), and give it a new name so that libvirt can detect a design
that works (patch 3).
All downstreams are urged to apply patches 1+2 as soon as they are
merged in QEMU.
Still, there are still other problems to solve.
In QEMU, exposing "-device isa-pvpanic" in the ACPI tables. Quite frankly
I don't have the time to fix this. We have ~3 months though. Patch 3
should not be applied until it is fixed.
Also, libvirt needs to know under which circumstances to add "-device
isa-pvpanic", besides obviously the availability of the device.
IMHO it is just too complicated to retrofit all complications in
<on_crash>. In fact, I suspect <on_crash> would match more closely
QEMU's
"internal error" state, and it would be quite useful to add that to the
QEMU driver.
Thus, libvirt could add support for an <on_panic> element with the
following values:
- default, which depends on the hypervisor and is "crash" for Xen,
"ignore" for everything else
- "crash", which is the only supported value on Xen and means "use
the value of <on_crash>"
- ignore, which is the behavior of old libvirt that don't know pvpanic
- restart, destroy, preserve, rename-restart as for <on_crash>. In
particular, preserve can still use the crashed_guest_panicked status,
thus keeping the API compatible.
- pause, to pause the VM (with a new substatus)
<on_panic> would also have a coredump='yes/no' attribute, where yes
is only valid if the element is *not* one of default/crash/ignore.
Only "default" and "ignore" would be accepted for QEMU that does not
support the isa-pvpanic device.
Ideally, the coredump attribute would be added to <on_crash> too
for simplicity (Xen would refuse coredump + rename-restart and
coredump + preserve).
Paolo
Paolo Bonzini (3):
vl: allow "cont" from panicked state
pc: get rid of builtin pvpanic
pvpanic: rename to isa-pvpanic
gdbstub.c | 3 ---
hw/i386/pc_piix.c | 8 --------
hw/i386/pc_q35.c | 6 ------
hw/misc/pvpanic.c | 16 +++-------------
include/hw/i386/pc.h | 3 ---
vl.c | 6 ++----
6 files changed, 5 insertions(+), 37 deletions(-)
--
1.8.3.1