mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-04 10:25:00 +00:00
DM:monitor: add monitor_register_vm_ops()
monitor_vm_ops and its helpers is added to allow DM to register operations , so thant vm manager could trigger the power state changes of VM. Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Yan, Like <like.yan@intel.com> Reviewed-by: Wang, Yu <yu1.wang@intel.com> signed-off-by: Yan Like <like.yan@intel.com> Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
committed by
lijinxia
parent
eada59c934
commit
9af35baf5a
@@ -43,4 +43,19 @@
|
||||
int monitor_init(struct vmctx *ctx);
|
||||
void monitor_close(void);
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
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);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user