[PATCH v4 0/5] ch: handle events from cloud-hypervisor

Purna Pavan Chandra Aekkaladevi posted 5 patches 2 weeks, 5 days ago
NEWS.rst            |   7 +
po/POTFILES         |   1 +
src/ch/ch_events.c  | 331 ++++++++++++++++++++++++++++++++++++++++++++
src/ch/ch_events.h  |  54 ++++++++
src/ch/ch_monitor.c |  52 ++++++-
src/ch/ch_monitor.h |  11 ++
src/ch/meson.build  |   2 +
7 files changed, 451 insertions(+), 7 deletions(-)
create mode 100644 src/ch/ch_events.c
create mode 100644 src/ch/ch_events.h
[PATCH v4 0/5] ch: handle events from cloud-hypervisor
Posted by Purna Pavan Chandra Aekkaladevi 2 weeks, 5 days ago
changes from v3->v4:
* Don't abort; instead kill the VM and exit
* use g_clear_pointer along with g_free
* Fix possible memory leak
* Rebase on latest master

changes from v2->v3:
* Remove patch 'utils: Implement virFileIsNamedPipe' as it is no more needed.
* Remove the eventmonitorpath only if it exists
* Added domain name as a prefix to logs from ch_events.c. This will make
  debugging easier.
* Simplified event parsing logic by reserving a byte for null char.

changes from v1->v2:

* Rebase on latest master
* Use /* */ for comments
* Remove fifo file if already exists
* Address other comments from Praveen Paladugu

cloud-hypervisor raises various events, including VM lifecylce operations
such as boot, shutdown, pause, resume, etc. Libvirt will now read these
events and take the necessary actions, such as correctly updating the
domain state. A FIFO file is passed to `--event-monitor` option of
cloud-hypervisor. Libvirt creates a new thread that acts as the reader
of the fifo file and continuously monitors for new events. Currently,
shutdown events are handled by updating the domain state appropriately.

Purna Pavan Chandra Aekkaladevi (5):
  ch: pass --event-monitor option to cloud-hypervisor
  ch: start a new thread for handling ch events
  ch: events: Read and parse cloud-hypervisor events
  ch: events: facilitate lifecycle events handling
  NEWS: Mention event handling support in ch driver

 NEWS.rst            |   7 +
 po/POTFILES         |   1 +
 src/ch/ch_events.c  | 331 ++++++++++++++++++++++++++++++++++++++++++++
 src/ch/ch_events.h  |  54 ++++++++
 src/ch/ch_monitor.c |  52 ++++++-
 src/ch/ch_monitor.h |  11 ++
 src/ch/meson.build  |   2 +
 7 files changed, 451 insertions(+), 7 deletions(-)
 create mode 100644 src/ch/ch_events.c
 create mode 100644 src/ch/ch_events.h

-- 
2.34.1