Commit Graph

100 Commits

Author SHA1 Message Date
Vijay Dhanraj b1f61669fc DOC: Usage guide for Virtio-blk blkrescan feature
This patch adds the steps required to use the newly
introduced blkrescan feature for Virtio-blk device.

Tracked-On: #3051
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2019-05-07 09:08:50 +08:00
Vijay Dhanraj f178788d7c Tools: New ACRNCTL command "blkrescan"
This patch adds support for new acrnctl command blkrescan.
Purpose: To add a virtio-blk device to guest VM after launch.
Use case:
1. Anticipate number of block devices that will be needed
   and add empty backend file while launching VM.
   e.g: -s 5, virtio-blk,nodisk
2. Use the following acrnctl command to trigger
   a rescan of virtio-blk device by guest VM, to
   revalidate and update the backend file.
   “acrnctl blkrescan VMname slot,newfilepath”

v5 -> v6:
- Removed unsed #define
- Reduced the size of param len of blkrescan command
  from 512 to 256.

v2 -> v5:
- No change

v1 -> v2:
- Renamed the acrnctl command and APIs from diskplug
  to blkrescan.
- Split the patch into two. This corresponds to
  changes in tools.

Tracked-On: #3051
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
2019-05-07 09:08:50 +08:00
Yin Fengwei 8055039545 Makefile: add gcc option to workaround build issue with latest gcc
With latest gcc, there are build error with current ACRN code.
Fixing could involve many code changes. We use gcc option to
remove build error as temperary workaround. And will fix the
build error one by one.

Tracked-On: #3010
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2019-04-25 21:28:32 +08:00
Long Liu 7852719a86 ACRN: tool: Fix buffer overflow risk in acrnctl
There will be a buffer overflow fisk in delete runc functions.
If the shell command function return length longer or equal to
the length of the buffer, at that time execute strstr function it
will cause buffer overflow issue. Set buffer's last byte to Zero
will avoid the risk.

Tracked-On: #3001
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Like Yan <like.yan@intel.com>
2019-04-23 15:12:39 +08:00
Yan, Like e216f3060c tools: acrn-mngr: add delay to allow user to prevent VM autostart for debug
There is an enhancement requirement about the VM auto-start for debug:
allowing the end user to optionally prevent automatic and immediate launching
of all Guest VM.

This commit adds a parameter to acrnd indicating the delay time before VM
auto-start, within the delayed period, user could stop acrnd to prevent the VM
auto-start. The default delay time is 0.

And definition of MACROs and static varialbes are moved to the beginning of
the source file.

Tracked-On: #2947
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-04-15 22:13:18 +08:00
Tao Yuhong 8c2ab95f49 tools: acrnd: fix wait_for_stop() return wrong vm state
Ported form apl_sdc_stable branch.
The wait_for_stop() first check if all VM are stopped or suspended.
It first check if VMs are stopped, then check if they are suspend.

If the VMs change state from running to stoped, after check VMs
stopped fail, before start check suspend state. wait_for_stop() will
mistake resopnse 'All vms have entered S3 state successfully'

To fix that, wait_for_stop() must only update VMs's state once, and
see if they are stopped, or suspended.

Tracked-On: #2398
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-04-15 18:07:00 +08:00
Tao Yuhong 2b900a43de tools: acrn-manager: fix mngr_send_msg() return 0 when read ack fail
Ported from apl_sdc_stable branch.
When do IPC with mngr_send_msg(), and ack is required but failed to
get ack,  mngr_send_msg() still return 0, that is not correct.

Tracked-On: #2398
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-04-15 18:06:27 +08:00
Jiang,Mao e50c0c88fb tools: acrn-manager: fix the possibility of creating directory at will by no permission process
There are several duplicate definitions for check_dir, it can check or create directory at will. However, only acrnd and dm monitor can create the directory. This commit fixs the possibility of creating directory at will by no permission process, which adds a param flags to conctrl if it should create the directory. By the way, this commit collates related MACRO into the same file , deletes the duplicate definitions in another files and fixs some format issues.

Tracked-On: #2886
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-04-15 17:01:03 +08:00
liuygzhuli e7f772444a Tools: acrnctl fix return value when it fails to execute the commands
Acrnctl commands return 0,even if when it fails to execute the commands.
 In this patch,fix this issue.It return none-zero when acrnctl commands
 failed in command executed.

 Tracked-On: #1262
 Signed-off-by:liuyonggang <yonggangx.liu@intel.com>
 Acked-by: Yan, Like <like.yan@intel.com>
2019-04-01 11:17:11 +08:00
liuygzhuli eea0ecd232 Tools: acrnctl fix return value when it fails to execute
the commands.

 acrnctl commands can manage multiple vms with a single
 command launched, which is not useful actually.
 To make the logic simple, this patch makes it to manage
 only a single vm by each command.

 Tracked-On: #1262
 Signed-off-by:liuyonggang <yonggangx.liu@intel.com>
 Acked-by: Yan, Like <like.yan@intel.com>
2019-04-01 11:17:11 +08:00
yuhong.tao@intel.com 5a7be9b869 tools: acrnctl fix cmd buffer is truncated when vmname too long
'acrnctl start vmname' use a cmd buffer with a sizeof 128 bytes,
cmd[128] buffer will be truncated, when vmnane size is bigger than
29 bytes. In that situation, vmnane size still smaller than
MAX_VM_OS_NAME_LEN, so it should be fixed.
Macro PATH_LEN is useful to determine the cmd[] buffer length, so move
it from acrn_mngr.c into acrn_mngr.h

Tracked-On: #2851
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yan Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-03-26 21:23:16 +08:00
yuhong.tao@intel.com b2f2d95246 tools: acrnctl restrict length of vmname to 32 bytes
When run 'acrnctl add launch_script.sh', vmname will be detected from
the launch script and stored in vmmngr_struct.name[MAX_VM_OS_NAME_LEN],
so vmname should not be longer than MAX_VM_OS_NAME_LEN.

Tracked-On: #2851
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2019-03-26 21:23:16 +08:00
liuygzhuli 0fb21cfa4a Tools: Acrnd fix reporting unnecessary error on NUC and UP2
The boards without IOC don't need to call get_sos_wakeup_reason function.
The HW IOC can be detected in runtime,via checking "/dev/cbc-early-signals" node.

Tracked-On:#1996
Signed-off-by: liuyonggang <yonggangx.liu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yuan Liu <yuan1.liu@intel.com>
2019-03-15 12:59:37 +08:00
yuhong.tao@intel.com bd24e2de74 tools: acrnctl fix potential buffer overflow
When run 'acrnctl add', acrnctl dryruns launch script to get
vmname. Acrnctl assumes there are no more than 64 words in each
line of the script, and creates a buffer to hold 64 pointers to these
words. But we didn't check if the number of words exceed 64 limitation,
which can lead to buffer overflow. This commit fixed this potential
overflow problem.
And also refine some confusing error messages in 'acrnctl add'

Tracked-On: #2734
Acked-by: Yan Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
2019-03-13 10:21:59 +08:00
yuhong.tao@intel.com 204f9750a8 tools: acrnd: Fix launch UOS by timer list without fork()
When acrnd_vm_timer_func() launch UOS, it need fork() and run, so
that do not block the main process.

Tracked-On: #2716
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
yuhong.tao@intel.com 5d6f6ab798 tools: acrn-manager: fix a race condition on updating VM state
For a running or suspended VM, its state is updated in 2 steps.
It is first set to VM_CREATED, then set to VM_STARTED/VM_PAUSED. IF
one thread check a running/suspend VM, it may get wrong state VM_CREATED,
while another thread is updating the VMs state.

Tracked-On: #2716
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
Kaige Fu d5ec844f86 tools: acrn-manager: Replace pdebug with explicit err msg
pdebug just provide information about function name and source code line number.
From debug point of view, it is better to give developer more detailed err msg.

Tracked-On: #2716
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
yuhong.tao@intel.com 48774f716f tools: acrn-manager: print more debug information
Print more information at acrnd_add_work(), query_state()
try_do_works() and handle_acrnd_resume()

Tracked-On: #2716
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-12 09:28:46 +08:00
Tw 33ecdd7389 Makefile: undefine _FORTIFY_SOURCE prior using it
Currently, we are enforcing the _FORTIFY_SOURCE=2 without any
previous detection if the macro has been already defined, e.g.
by environment, or is just enabled by compiler by default on
some distributions (e.g. Gentoo).

This could result in the error like this:
<command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror]
<built-in>: note: this is the location of the previous definition

Tracked-On: #2344
Signed-off-by: Tw <wei.tan@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-02-28 11:56:45 +08:00
Long Liu f95da1832e dm: acrn-tool: Add del runC configuration in acrnctl del
The patch adds logic to delete runC configuration in acrnctl del command.
After launch the VM in container there will have configuration files in user
directory. When delete the VM by "acrnctl del" command the command will delete
the runC configuration files at same time.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yu Wang <yu1.wang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-02-25 20:24:22 +08:00
Long Liu a0efd3e591 dm: acrn-tool: Add new parameter for acrnctl add
This patch adds the "-C" parameter handing in acrnctl. The "-C"
parameter be introduced for acrn-dm QoS feature. By current acrnctl
implementation, it will dry run the launch_uos.sh script to obtain the
VM name which defined during script execution.
The patch will strip "-C" parameter during the script dry run to avoid
create unexpected container, and add the "-C" parameter to the arguments
file after the script dry run.

Tracked-On: #2020
Signed-off-by: Long Liu <long.liu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-02-25 20:24:22 +08:00
Yan, Like b43f5cba57 tools: do not include unnecessary files in release build
This commit removes the unnecessary tool files in release build, including:
- entire acrnlog module
- entire acrntrace module
- acrnctl binary in acrn-manager

Tracked-On: #2575
Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Huang, Yonghua <yonghua.huang@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2019-02-22 16:09:04 +08:00
Ross Burton 912be6c4dd tools: respect CFLAGS and LDFLAGS from environment
The build environment might want to pass extra CFLAGS or LDFLAGS to the build of
the acrn tools. With conventional build systems like automake, Meson, etc this
is possible by just setting CFLAGS and LDFLAGS in the environment.

However as the tools are built using bare Makefiles, these environment variables
are overwritten.  Respect them by renaming the variables in the Makefiles to
e.g. LOG_CFLAGS and adding CFLAGS to that.

Tracked-On: #2316
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-24 09:33:00 +08:00
Yin Fengwei 73ab727434 dm: set correct thread name
When issue happen, we could identify which thread is impacted.
This could help stability issue debugging.

Tracked-On: #2037
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2018-12-14 19:50:50 +08:00
Yan, Like 04fef4f363 tools: acrn-manager: change path of vm conf files
The path of vm conf files changed from "/opt/acrn/conf" to "/usr/share/acrn/conf",
since "/opt" is not generally used on clearlinux.

Tracked-On: #2040
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-12-13 09:09:41 +08:00
yuhong.tao@intel.com bc5b27a73d tools: acrnctl: increase STOP_TIMEOUT to 30s when reset VM
The 'acrnctl reset' is implemented by a stop/start sequence. Reset failure was
observed since UOS is not able to shutdown within default 10s timeout.
This commit increased the default timeout to be 30s, and added an explicit error
message if 'acrnctl reset' due to UOS shutdown timeout.

Tracked-On: #2016
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2018-12-12 15:41:13 +08:00
yuhong.tao@intel.com 7ee0e2e2a4 tools: acrnctl: Fix path error when run "acrnctl add" cmd
There is a bug to run 'acrnctl add /[path]/script.sh', when the
launch script has an absolute path. Acrnctl will generate wrong path
for temp files and fail to add VM.

And message '/opt/acrn/conf: No such file or directory' always comes
out, until user once successfully run 'acrnctl add' cmd. That is reported
by _scan_added_vm(), because 'opt/acrn' is missing, only 'acrnctl add'
can create it, we should also check it in _scan_added_vm().

Tracked-On: #2013
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-12-10 09:26:08 +08:00
yuhong.tao@intel.com 2f33d1bcf2 tools: acrn-manager: Fix acrnctl mistake displaying suspended to paused
When UOS is sleeping, 'acrnctl list' command show it is 'paused', not
'suspended'. That is not correct. Because pausing an UOS means to block
its VCPUs immediately, otherwise suspending an UOS means to put it to
sleep.

Tracked-On: #1910
Acked-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-11-28 13:42:27 +08:00
Ming Liu 7978188c1d tools: acrn-manager: set MAX_NAME_LEN to 32
I am currently using Yocto build and deploy UOS images, it would be
much more convenient to let the VMs to have the same names with when
they are being built. For instance, a typical image name in Yocto is
like: uos-image-weston, but it can not show the name completely with
'acrnctl list', since the length limit is 16.

Increasing the limit to 32 would fix this problem.

Tracked-On: #1837
Signed-off-by: Ming Liu <liu.ming50@gmail.com>
2018-11-19 12:52:46 +08:00
Yan, Like d49a6f6fca capture acrnd AaaG booting messages to journald
It's for AaaG boot time measurement only.

Tracked-On: #1759
Signed-off-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-11-08 15:14:15 +08:00
Tianhua Sun 313941e853 tools: acrn-manager: remove unsafe api sscanf
function sscanf is banned according to the security
requirements. So remove sscanf api.

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Tao, Yuhong <yuhong.tao@intel.com>
2018-11-05 09:50:04 +08:00
Tianhua Sun b12c7b741b tools: acrn-manager: remove usage of banned APIs
1, replace strlen with strnlen
2, Return value check for strncpy function

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
2018-11-01 11:22:26 +08:00
Tianhua Sun af760f8dce tools: acrn-manager: refine the usage of api 'snprintf'
Return value check for snprintf function

Tracked-On: #1254
Signed-off-by: Tianhua Sun <tianhuax.s.sun@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Kaige Fu <kaige.fu@intel.com>
2018-11-01 11:22:26 +08:00
Kaige Fu d29937374a tools: acrnd: Stop all vms when SOS shutdown/reboot
When SOS shutdown/reboot, systemd will send SIGTERM to acrnd. We should catch up
this signal and stop all vms gracefully.

BTW, this path also fix the following error when stop acrnd service by removing
ExecStop config. Systemd will send SIGTERM signal to process by default.

systemd[9378]: acrnd.service: Failed to execute command: No such file or directory
systemd[9378]: acrnd.service: Failed at step EXEC spawning /usr/bin/killall: No such file or directory
-- Subject: Process /usr/bin/killall could not be executed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- The process /usr/bin/killall could not be executed and failed.
--
-- The error number returned by this process is 2.

Tracked-On: #1563
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-25 13:30:14 +08:00
yuhong.tao@intel.com a853c05546 tools: acrnctl: fix: resume default wakeup reason is CBC_WK_RSN_BTN
UOS requires an wakeup reason when resumed from S3 suspend. If user
use "acrnctl resume [VMNAME]" without an reason, 0x0 will be used
as default reason, and this is not work. We can use CBC_WK_RSN_BTN
instead.

Tracked-On: #1550
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-24 18:13:10 +08:00
Yan, Like 4ce80e5ccc tools: acrn-manager: fix a potential compiler warning
Tracked-On: #1479
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-22 09:03:19 +08:00
Yan, Like e8c86566b1 tools: acrn-manager: fix a potential NULL pointer dereference
check the return value of vmmngr_find() before dereference in wait_vm_stop()

Tracked-On: #1479
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-22 09:03:19 +08:00
Kaige Fu da3b02702f tools: acrnd: Ignore null line reading from timer_list
Error msg "Invalid vmname from timer list file" will be print out when we read
a null line of file timer_list. It is a litte bit confusing. So, ignore null line
silently to avoid such confusing msg.

Tracked-On: #1517
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-20 23:43:39 +08:00
Kaige Fu a45d961bf8 tools: acrnd: check weakup reason first in init_vm
This patch is mainly for:
  1. Check weakup reason first and only load timer list when reason is CBC_WK_RSN_RTC.
  2. If failing to load timer list or reason != CBC_WK_RSN_RTC, activate all vms.
  3. Add info about when we are about to activate vms reading from timer_list file.

Tracked-On: #1517
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-20 23:43:39 +08:00
Kaige Fu 193da97103 tools: acrnd: Refine log msg to avoid confusing.
When guest enter S5, its monitor socket will be closed. If we try to use it to
query the vm state, an error msg will be print out. Acctually, we should not take
it as an error.

So, this patch refine the log msg to show more details when guest trying to enter
S3/S5.

Tracked-On: #1506
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2018-10-19 22:30:17 +08:00
Yan, Like eb97b2f082 tools: acrn-manager: remove assumption of fd num less than 1024
mngr_send_msg() could take mngr descriptor or real socket fd as argument based on
an assuption that real socket fd is less than 1024, which may be an issue.
This commit takes the real socket fd as descriptor, to avoid the conversion between them.

Tracked-On: #1477
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-16 11:31:57 +08:00
Yan, Like f582757dd4 tools: acrn-manager: fix fd leaking
close dir to avoid fd leaking.

Tracked-On: #1477
Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-10-16 11:31:57 +08:00
Yan, Like 398ac203ca Update acrn_vm_ops.c 2018-09-27 16:55:50 +08:00
Yan, Like e6c3ea3b3b tools: acrn-manager: init vmmngr_head with LIST_HEAD_INITIALIZER
To fix the issue that vmmngr_head may be used uninitialized.

Tracked-On: #1157
Signed-off-by: Yan, Like <like.yan@intel.com>
2018-09-27 16:55:50 +08:00
Yan, Like 1b9a3b3e71 tools: acrn-manager: update Makefile
Update the Makefiel to sync the compiler options with devicemode
and enable options to harden software.

Tracked-On: #1122
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-09-25 13:09:41 +08:00
Yan, Like 227a8c436b tools: acrn-manager: fix warnings before updating Makefile
- Print warning if string truncated to avoid the warning generated
  by -Wformat-truncation by GCC 7.0 and newer version;
- fixed strncpy size.

Tracked-On: #1122
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2018-09-25 13:09:41 +08:00
yuhong.tao@intel.com 270a833283 tools: acrnd: bugfix: service lack of prerequisition
As a system service, acrnd will launch UOS, that must be done
after all required services and conditions are ready, such as
acrnprobe, weston, etc.

Tracked-On: #1278
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2018-09-25 13:08:54 +08:00
Yan, Like 4ae88bb676 tools: acrn-manager: fix acrnctl reset issue
Wait for targeting VM stopping before starting it again

Tracked-On: projectacrn/acrn-hypervisor#926
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-09-11 08:41:47 +08:00
Yan, Like f42209c567 tools: acrn-manager: remove unnecessary "current" field
Remove the unnecessary "current" field when store/load timer list.

Tracked-On: #927
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-09-11 08:41:47 +08:00
Yan, Like 0ca90ba6be tools: acrn-manager: rework acrnd resume flow
This commit reworked the resume flow:
 - generate RSN_RTC wakeup reason to resume_vm();
 - clear timer_list in memory once it's saved to fs;
 - wakeup the suspended VMs only if wakeup by ignition button.

Tracked-On: #927
Signed-off-by: Yan, Like <like.yan@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
2018-09-11 08:41:47 +08:00