Commit Graph

249 Commits

Author SHA1 Message Date
Yan, Like 83c971221d doc: acrnlog: update loglevel usage
This commit updates the usage of "loglevel" command in README.rst, which was
out-of-date due to change of "loglevel" command.

Tracked-On: #2712
Signed-off-by: Yan, Like <like.yan@intel.com>
2019-05-08 08:43:44 -07:00
Kaige Fu 21b82d8815 tools: Fix the non-effective option -f --frequency
We use global variable TSC_FREQ defined in config.py in each of the analyzers.
And the value set to TSC_FREQ through option -f/--frequency doesn't take effect.

This patch fix it by adding one parameter to each of the analyzers and pass
the value set by -f/--frequency to it instead of use the global one.

Tracked-On: #3085
Signed-off-by: Kaige Fu <kaige.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-05-08 16:58:01 +08:00
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
Liu, Xinwu ae11bd403d tools:acrn-crashlog: check the folder size by calculating the increment
This patch refines the process of log space check.
Check a folder's size need to traverse all nodes of files and subdirs,
in the case of extreme memory strain, accessing these log file nodes
frequently will increase the IO pressure on the eMMC.
Previously, all log files will be accessed and counted in each space
check, this patch refines it by only calculating the increment of new logs.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu 38cd3f74bd tools:acrn-crashlog: unify events process in sender telemd
This patch unifies the event handling process in the
telemd_sender functions:
a. unify the event analyzing process.
b. unify the event resource requesting process.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu 728a480693 tools:acrn-crashlog: request resources of SOS in crashlog
Dispatch the new event id and log directory in one place.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu 901ce53971 tools:acrn-crashlog: unify the event analyzing process in crashlog
This patch unifies the event analyzing process in the
crashlog_sender functions:
a. analyze android events in android_events.c.
b. unify the analyzing output form of vm events and crash events.
c. concentrate the event analyzing process to the same function.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu 13d50c2296 tools:acrn-crashlog: check blocks size instead of file size
What acrnprobe really care about is the storage capacity taken up from
emmc. This patch checks all the logs' blocks size instead of the file
size before collecting new logs.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu fa1216325b tools:acrn-crashlog: separate the detection and collection of vm events
Push the recorded vm events to event_queue, and let senders do the
collecting job in the event_handler thread.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu 84cf7156ae tools:acrn-crashlog: update operations about vmrecord
Replace vmrecord file operations with new functions in vmrecord.c.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu b5236f21fd tools:acrn-crashlog: new functions to operate file vmrecord
This patch provides some new functions to operate file
/var/log/crashlog/VM_eventsID.log.
Adding a mutex to protect this file as it will be accessed in multiple
threads in the coming patches.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +08:00
Liu, Xinwu 9d22a18659 tools:acrn-crashlog: simplify the logic in sender
Function sender_id need to traverse all senders and then find the
matched id. This patch adds property "id" for each configuration object
and removes function sender_id.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Liu, Xiaojing <xiaojing.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-29 17:04:27 +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
Liu, Xinwu 0b37fc0b17 tools:acrn-crashlog: fix the compiling error on gcc version 9.0.1
Meet compiling error:

In function ‘strncpy’,
    inlined from ‘main’ at main.c:88:4:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’
specified bound 4096 equals destination size
[-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos
(__dest));
      |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

This patch aims to fix it.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-04-25 14:50:58 +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
CHEN Gang 048d72fd94 tools: acrn-crashlog: fix some possible memory leak
This patch is to fix some possible memory leak issues, which are
reported by static analysis tool.

1. free uptime in error case handling of function parse_uptime.
2. unmap f in error case handling of function _file_read_key_value.

Tracked-On: #2917
Reviewed-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Signed-off-by: CHEN Gang <gang.c.chen@intel.com>
Acked-by: Zhang Di <di.zhang@intel.com>
2019-04-16 11:23:28 +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
David B. Kinder e7605fad7d doc: fix misspellings
Fix misspellings missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-04-11 15:45:41 -07:00
Jie Deng 00dd26b081 dm: remove "acrn_" prefix from tap name
Some projects based on ACRN don't want tap name to contain "acrn_"
prefix. This patch removes that prefix.

Tracked-On: #2509
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2019-04-09 10:59:45 +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
Jiang,Mao 71f75ebf23 Tools: acrnlog: fix confusing message "bad file descriptor" when start acrnlog
ACRNLog tries to open acrn_hvlog_last_* without check the presence of the device nodes at startup, which results a confusing message reporting "bad file descriptor" when there is no last device nodes exist. This commit fix the issue by checking the number of last devices before trying to open them.

Tracked-On: #2787
Signed-off-by: Jiang Mao <maox.jiang@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-03-29 12:15:20 +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
David B. Kinder e9335fcee6 doc: fix utf-8 punctuation, branding, spelling
Fix some stray UTF-8 punctuation and symbol characters, unnecessary
trademark symbols, and some misspellings missed during regular reviews.

Tracked-On: #2712

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-03-14 09:13:58 -07: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
Liu, Xinwu e299553896 tools: acrn-crashlog: new file to count all events happened in system
Since "history_event" file records limited events (5000 lines by default),
a new file named "all events" to count all kind of events.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-02-28 13:18:57 +08:00
Liu, Xinwu 73e5323261 tools: acrn-crashlog: stop only collecting logs when exceeding configured size
Crashlog would drop all events after the storaged log size exceeds the
configured parameter "foldersize" previously, that basically means all
activities are stopped.

This patch brings other activities back (e.g. the records in the file
"history_event" will be updated continually), and restricts the "foldersize" by
stopping log collection.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-02-28 13:18:57 +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
Ross Burton 5ba4afcffe Use $(MAKE) when recursing
Using 'make' directly means that the jobserver environment variables don't get
passed down, so sub-builds for example don't use -j.

This is documented as the wrong thing to do:
https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html#MAKE-Variable

Use $(MAKE) instead, and compile times drastically improve:

  acrn-devicemodel    do_compile   -13.5s   -89.6%      15.0s -> 1.6s

Tracked-On: #2370
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-24 08:22:32 +08:00
Liu, Xinwu d5b578fd84 tools: acrn-crashlog: Limit the log size of kmsg
Dmesg collects too much log when kernel meets log storm.
This patch reads kernel log from "/dev/kmsg" intead of dmesg and limits
the generated log size.

Tracked-On: #1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Reviewed-by: Zhi Jin <zhi.jin@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-01-10 12:22:28 +08:00
Liu, Xinwu 156ea70821 tools: acrn-crashlog: Reboot system to cold after collecting reserve log
After panic, kernel will do warm boot to reserve memory for log collecting.
Need to cold reboot system as the original behaviour.

Tracked-On:#1024
Signed-off-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: Chen, Gang <gang.c.chen@intel.com>
2019-01-10 11:01:40 +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
David B. Kinder e4143ca138 doc: fix use of double dashes
Sphinx transforms ``--`` into an en-dash within a paragraph (not within
a code, pre, or kbd block though).  This presents a problem documenting
command parameters such as ``--name`` where the ``--`` is transformed
into a single en-dash.  Rather than disabling all smartquote
transformations in the Sphinx conf.py (setting ``smartquotes = False``),
we fixes cases where ``--`` should not be transformed by using a block
that is ignored by the smartquote transformation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2018-12-12 15:06:43 -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