mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-10-09 05:43:44 +00:00
monitor: an interface of acrn-dm
A monitor component will be added to acrn-dm, which crteats socket, bind and listening at /run/acrn/vmname. Acrnctl & acrnd could conn -ect to the socket for communication, using defined message, in include/monitor_msg.h For each defined message, a message handler callback could be registered via monitor_add_msg_handler(). On received of a defined message, a certain call back will be called. Each callback can only see the message sender's socket-fd. When acrn-dm want report something, not triggered by incoming message it can send broadcast message, use monitor_broadcast(). Acked-by: Eddie Dong <eddie.dong@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Yin, Fengwei <fengwei.yin@intel.com> Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
#include "rtc.h"
|
||||
#include "version.h"
|
||||
#include "sw_load.h"
|
||||
#include "monitor.h"
|
||||
|
||||
#define GUEST_NIO_PORT 0x488 /* guest upcalls via i/o port */
|
||||
|
||||
@@ -801,6 +802,7 @@ main(int argc, char *argv[])
|
||||
|
||||
vrtc_init(ctx, rtc_localtime);
|
||||
sci_init(ctx);
|
||||
monitor_init(ctx);
|
||||
|
||||
/*
|
||||
* Exit if a device emulation finds an error in its
|
||||
@@ -863,6 +865,7 @@ main(int argc, char *argv[])
|
||||
*/
|
||||
mevent_dispatch();
|
||||
|
||||
monitor_close();
|
||||
vm_pause(ctx);
|
||||
fbsdrun_deletecpu(ctx, BSP);
|
||||
vm_unsetup_memory(ctx);
|
||||
|
Reference in New Issue
Block a user