Hi all.

This series fixes a race between guest shutdown and SIGTERM handling.
With -no-shutdown, a SIGTERM arriving while QEMU is processing a guest
shutdown request can make QEMU exit after sending SHUTDOWN with guest=true,
without sending a host SHUTDOWN event. This is unexpected for management
software relying on -no-shutdown.

Patch 5 contains the fix and a detailed description of the race. The
preceding patches prepare for it, and patch 6 makes the runstate action
variables private.

Vladimir Sementsov-Ogievskiy (6):
  runstate: introduce qemu_system_shutdown_request_safe() helper
  runstate: treat SHUTDOWN_CAUSE_HOST_UI as force_shutdown
  runstate: inline qemu_shutdown_requested()
  runstate: simplify qemu_shutdown_requested_get()
  runstate: separate forced and regular shutdown requests
  runstate: make runstate actions private

 MAINTAINERS                      |   1 -
 hw/xen/xen-hvm-common.c          |   2 +-
 include/system/runstate-action.h |  19 ------
 include/system/runstate.h        |   2 +-
 monitor/qmp-cmds.c               |   2 -
 system/meson.build               |   1 -
 system/runstate-action.c         |  46 --------------
 system/runstate.c                | 103 +++++++++++++++++++++----------
 system/vl.c                      |   2 +-
 ui/cocoa.m                       |   2 -
 ui/sdl2.c                        |   3 -
 11 files changed, 75 insertions(+), 108 deletions(-)
 delete mode 100644 include/system/runstate-action.h
 delete mode 100644 system/runstate-action.c

-- 
2.43.0

Reply via email to