acrn-hypervisor/devicemodel/core/cmd_monitor
Wu Zhou c77fb77e78 dm: vm_event: add vm_event support in cmd monitor
This patch added vm_event support in command monitor, so that vm_event
can be sent to a client (e.g., Libvirt) through the monitor.
As the command monitor works in socket server mode, the vm_event sending
process is designed in this way:
1. If a client wishes to receive vm_event, it issues a
   REGISTER_VM_EVENT_CLIENT command to the monitor.
2. Command monitor then handles the REGISTER_VM_EVENT_CLIENT command. If
   it is legitimate, the client is registered as as vm_event receiver.
   The command monitor then send a ACK to the client, and keeps the socket
   connection.
3. When a vm_event is generated, the command monitor send it out through
   the socket connection.
4. Only one event client is allowed.
5. The registration is cancelled on socket disconnection.

Tracked-On: #8547
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
2024-02-01 17:01:31 +08:00
..
cmd_monitor.c dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00
command_handler.c dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00
command_handler.h dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00
command.c dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00
command.h dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00
socket.c dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00
socket.h dm: vm_event: add vm_event support in cmd monitor 2024-02-01 17:01:31 +08:00