dm: vm_event: create vm_event thread

This patch creates a thread for vm_event delivery. The thread uses epoll
to poll event notifications, then read out the msg data queued in sbuf.
An event handler is called upon success receiving. Both HV and DM event
sources share the same process.

Also vm_event tx API for DM event source is added in this patch.

Tracked-On: #8547
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
This commit is contained in:
Wu Zhou
2023-07-24 14:32:21 +08:00
committed by acrnsi-robot
parent e83ae3e664
commit d9ccf1ccb2
3 changed files with 118 additions and 1 deletions

View File

@@ -833,6 +833,8 @@ struct shared_buf {
#define VM_EVENT_POWEROFF 1U
#define VM_EVENT_TRIPLE_FAULT 2U
#define VM_EVENT_COUNT 3U
#define VM_EVENT_DATA_LEN 28U
struct vm_event {