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>
2018-04-03 02:57:47 +08:00
|
|
|
/*
|
|
|
|
* Project Acrn
|
|
|
|
* Acrn-dm-monitor
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
|
|
*
|
2018-05-26 01:49:13 +08:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
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>
2018-04-03 02:57:47 +08:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Author: TaoYuhong <yuhong.tao@intel.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* acrn-dm monitor APIS */
|
|
|
|
|
|
|
|
#ifndef MONITOR_H
|
|
|
|
#define MONITOR_H
|
|
|
|
|
|
|
|
int monitor_init(struct vmctx *ctx);
|
|
|
|
void monitor_close(void);
|
|
|
|
|
2018-05-30 02:44:13 +08:00
|
|
|
struct monitor_vm_ops {
|
|
|
|
int (*stop) (void *arg);
|
|
|
|
int (*resume) (void *arg);
|
|
|
|
int (*suspend) (void *arg);
|
|
|
|
int (*pause) (void *arg);
|
|
|
|
int (*unpause) (void *arg);
|
|
|
|
int (*query) (void *arg);
|
2019-04-18 08:49:26 +08:00
|
|
|
int (*rescan)(void *arg, char *devargs);
|
2018-05-30 02:44:13 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
int monitor_register_vm_ops(struct monitor_vm_ops *ops, void *arg,
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
/* helper functions for vm_ops callback developer */
|
|
|
|
unsigned get_wakeup_reason(void);
|
|
|
|
int set_wakeup_timer(time_t t);
|
2018-10-29 14:24:54 +08:00
|
|
|
int acrn_parse_intr_monitor(const char *opt);
|
2019-04-18 08:49:26 +08:00
|
|
|
int vm_monitor_blkrescan(void *arg, char *devargs);
|
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>
2018-04-03 02:57:47 +08:00
|
|
|
#endif
|