Commit Graph

82 Commits

Author SHA1 Message Date
Victor Sun 6f7081f620 acrn-config: remove vm3 for industry scenario
The VM2 of INDUSTRY scenario need 2 vCPUs for performance, so there would
be no available pCPU for VM3, need to remove VM3 for this scenario.

Tracked-On: #3925

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-10-25 15:17:40 +08:00
Wei Liu feba836944 acrn-config: refine ttyS info of board file
The previous method to handle ttyS info has an assumption that PCI
serial devices are all mmio type, this caused incorrect BDF info in
board XML file.
This patch fix this issue by dropping serial device BDF info and
replace it with IO type.

Tracked-On: #3900
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-25 10:56:23 +08:00
Wei Liu b6a8052045 acrn-config: filter out the proper wifi/ethernet device
Filter out the wifi/ethernet device from webUI with below PCI device class coding rule:
ethernet: 0200/0280;
wifi: 0280/0d20/0d21/0d80;

Tracked-On: #3917
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-25 09:02:23 +08:00
Shuang Zheng defeb851bc acrn-config: fix the issue no error message in launch setting
fix the issue that there is no error message displayed in launch setting of WebUI.

Tracked-On: #3913
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-10-25 09:02:23 +08:00
Wei Liu d9f0d8dcf0 acrn-config: fix the wrong 'key' type returned to webUI
Fix the wrong 'key' type of error list returned to webUI for parsing.

 Tracked-On: #3913
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-25 09:02:23 +08:00
Wei Liu 9ea7a85ca5 acrn-config: set default package value for _S3 and _S5
Some BIOS does not support s3/s5, so there might be no _S3 or _S5
package in host ACPI table, previous code did not handle this, so
the build would be failed with the generated board file.
Set default s3/s5 package value to 0 for such case.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 15:13:51 +08:00
Wei Liu 24d3eaba27 acrn-config: skip git environment check when not do git commit
Check git environment only when '--enable_commit' option was set.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 15:13:51 +08:00
Wei Liu fbd8597fbf acrn-config: refine 'lpc' setting with console type
Refine 'lpc' setting for acrn-dm option.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 15:13:51 +08:00
Yuan Liu 73b8c91e06 Misc: lifemngr-daemon-on-UOS for windows
For cross-VM S5 notify via vUART, life_mngr service is running on UOS.
It is listening on COM2 to get SOS's commands.
The protocol is: SOS send "shutdown", UOS feedback "acked".

When SOS triggle shutdown, SOS can 1) check VM's status until UOS
stopped, 2) retry shutdown UOS normally with timeout.
So, no matter life_mngr server is running, SOS's shutdown procedure will
properly finish.

Tracked-On: #3564
Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2019-10-24 13:20:53 +08:00
Wei Liu 1c7bf9fd56 acrn-config: refine the vbootloader of vm
Refine the vbootloader type of vm,
The vbootloader type should be select from vsbl/ovmf/none in webUI item.

Tracked-On: #3879
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 11:42:27 +08:00
Wei Liu a71623595e acrn-config: add '--windows' option for WaaG vm
Add the '--windows' option to launch WaaG vm.

Tracked-On: #3880
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-24 11:40:17 +08:00
Wei Liu 009d835bba acrn-config: modify board info of block device info
As the blkid info contains 'UUID' information, which easy to lead to
confuse with the vm 'UUID'. So refine the format for block device.

v1-v2:
    1). align the style in BLOCK_DEVICE_INFO tag
    2). add 'mmcblk1p3' in BLOCK_DEVICE_INFO tag

v2-v3:
    1). correct the commit message.
    2). refine the api of handle_block_dev

Tracked-On: #3754
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 09:30:28 +08:00
Wei Liu 96dede43ad acrn-config: modify ipu/ipu_i2c device launch config of apl-up2
Correct the default settings of ipu/ipu_i2c device for apl-up2.

Tracked-On: #3863
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:58:04 +08:00
Wei Liu 001c929dd4 acrn-config: correct launch config info for audio/wifi defice of apl-mrb
The audio and Wifi device info in apl-mrb config xmls is wrong, fix it.

Tracked-On: #3863
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:58:04 +08:00
Wei Liu 2a647fa164 acrn-config: define vm name for Preempt-RT Linux in launch script
The vm name for Preempt-RT Linux is not defined in launch script,
causing Preempt RT linux launch failed.
This patch refine the vm name and define the vm name for Preempt-RT
Linux to fix such kinds of issues.

Tracked-On: #3852
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:57:47 +08:00
Wei Liu a2430f1313 acrn-config: refine board name with undline_name api
Sometimes character '-' or space need to be converted to '_' to make string format uniformed.
Add this common api to satisfy such requirment and refine the code for board name generating.

Tracked-On: #3852
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:57:47 +08:00
Wei Liu 95b9ba36b0 acrn-config: acrn-config: add white list to skip item check
Some acrn-dm arguments are not needed when launch some vm, but the
item check fucntion still has strict check on the arguments, which
result in the script generating failure.
This patch add whilte list to skip the check.

Tracked-On: #3852
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-22 08:57:47 +08:00
Yonghua Huang fc40ee4c83 vm-manager: fix improper return value check for "strtol()"
The return value of 'strtol()' is not checked properly
 in _get_vmname_pid() @acrn_vm_ops.c and parse_opt()@acnrd.c,
 the return type of 'strtol' is 'long int', but it is assigned
 to a variable with type of 'int' and compared to "LONG_MAX"
 and "LONG_MIN", which is always false.

 This patch is to fix above error case.

Tracked-On: #3859
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-10-22 08:57:03 +08:00
Wei Liu 96b4a6dbff acrn-config: add 'boot_audio_option' while auido/audio_codec set
Fixed the issue that parameter of 'boot_audio_option' is lost when
audio/auido codec device is configured.

Tracked-On: #3853
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-21 16:49:35 +08:00
Wei Liu 1326eec4eb acrn-config: refine the tools for audio/audio_codec
There are 2 scenarios to pass through audio/audio_codec:
1. Only pass through audio device to vm.
2. Pass through audio and audio codec device to vm.
The improvement is to generate proper boot audio option for each
scenario.

Tracked-On: #3853
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-21 16:49:35 +08:00
Wei Liu 950e3aa224 acrn-config: refine parameters for media_pt function
some parameters for media_pt function are not needed any more,
remove these redundant parameters.

Tracked-On: #3853
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-21 16:49:35 +08:00
Wei Liu 73ac285ec3 acrn-config: add 'run_container' back to the launch script
'run_container' starts to run the container which contains the
clearlinux rootfs. store it in the same launch script with clearlinux.

Tracked-On: #3811
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-18 15:35:10 +08:00
Wei Liu 55e4f0aff9 acrn-config: remove '-V' option from launch config
Remove '-V' option of launch type while generating launch script.

Tracked-On: #3811
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-18 15:35:10 +08:00
Wei Liu aee3bc3622 acrn-config: enable item check for launch config tool
1. enable item check for acrn-dm args which set from webUI input.
2. remove 'cpu_num' tag from launch config xml.

v1-v2:
    1). add method to check 'cpu_num'/'mem_size' in config xml.

v2-v3:
    1). as 'vcpu_num' configured in scenario, the parameter for acrn-dm is no
longer needed, remove 'cpu_num' tag and its handler from launch config.
    2). add 'poweroff_channel' tag for generic config.

Tracked-On: #3811
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-18 15:35:10 +08:00
Victor Sun c74a197c24 acrn-config: modify SOS i915 plane setting for hybird xmls
Change i915.domain_plane_owners and i915.avail_planes_per_pipe for
hybrid scenario;because kvm based User vm will use PipeA.

Tracked-On: #3840
Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-10-16 21:14:13 +08:00
Shuang Zheng afb3608b81 acrn-config: add confirmation for commit of generated source in config app
add a confirmation interface to let user to commit changes into local tree
or not commit after generated source codes in config app.

Tracked-On: #3834
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-10-16 15:37:30 +08:00
Wei Liu 8eaee3b09b acrn-config: add "enable_commit" parameter for config tool
Config tool will generate files for board/scenaro/launch, some files are
part of souce code for specify board. Git add/commit these files should
be one optional of user experience. Add "--enable_commit" parameter to
enable git add/commit.

usage:
--enable_commit: flag of whether to do git commit the config file changes
to current git branch. Do commit with this flag and not do without the flag.

Tracked-On: #3834
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-16 15:37:30 +08:00
xiaojin2 780a53a175 tools: acrn-crashlog: refine crash complete code
This patch is to remove unused info in server.c

Tracked-On: #3787
Signed-off-by: xiaojin2 <xiaojing.liu@intel.com>
Reviewed-by: Liu, Xinwu <xinwu.liu@intel.com>
Acked-by: CHEN Gang <gang.c.chen@intel.com>
2019-10-16 10:41:46 +08:00
Wei Liu 89f53a409a acrn-config: supply optional passthrough device for vm
To match launch config xml, supply more optional passthrough device to
vm.

Tracked-On: #3812
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2019-10-16 10:24:23 +08:00
Shuang Zheng 44c11ce6c4 acrn-config: fix the issue some select boxes disappear after edited
fix the issue: some select boxes disappear unexpectly after edited

Tracked-On: #3809
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-10-15 13:18:20 +08:00
Shuang Zheng 62ed91d303 acrn-config: update vcpu affinity in web UI
According to the new vcpu affinity configuration method, update vcpu
configuration in Web UI from multi-select box to seperated select box
which can dynamically add or delete vcpus with mapped pcpus.

Tracked-On: #3798
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-10-12 16:22:27 +08:00
Wei Liu c442f3f4d1 acrn-config: keep align with vcpu_affinity for vm config
The pcpu sharing for vm already enabled in master branch, acrn-config
tool for generating scenario config souce file should keep align with master branch.

1. Add 'vcpu_affinity' tag and its vaule in config xml.
2. Parse the 'vcpu_affinity' tag of value from config xml for generating vcpu_affinity.

v1-v2:
    1). apl-up2-n3350 has two PCPUs, set appropriate value for vcpu_affinity.

Tracked-On: #3798
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-12 16:22:27 +08:00
Wei Liu db909edda5 acrn-config: refine the data type for member of class
Unify the data type for scenario item.

1. Unified the scenario item, the type modified from list to dictionary.
2. remove some unused function.
3. add 'pci_dev_num'/'pci_devs' to hybrid xml for future support.

Tracked-On: #3798
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-12 16:22:27 +08:00
Wei Liu ee66a94ccf acrn-config: grab Processor CPU number from board information
The value of CONFIG_MAX_PCPU_NUM is stands for Processor CPU number and
it is grabed from board information.

Tracked-On: #3798
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-12 16:22:27 +08:00
Wei Liu bb1a8eea40 acrn-config: fix pci sub class name contain "-" and ' '
Current python code could handle pci sub class name contain "-" as
expected, but some space characters may still exist. This patch support
to parse similar strings which contain "-" and ' ' for pci sub class name.

Also, add the index number as suffix for the similar strings

Tracked-On: #3788
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-10-10 09:35:43 +08:00
fuyanX df5ef925bf Misc: life_mngr clear compile warning
As Makefile's strict check, clear compile warnings for life_mngr.

Tracked-On: #3564
Signed-off-by: fuyanX <yanx.fu@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-10-08 11:39:22 +08:00
fuyanX 91366b876c Misc: lifemngr add Makefile
Add Makefile for life_mngr. life_mngr is a service on UOS.

Tracked-On: #3564
Signed-off-by: fuyanX <yanx.fu@intel.com>
Reviewed-by: VanCutsem, Geoffroy <geoffroy.vancutsem@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2019-10-08 11:39:22 +08:00
Victor Sun 0906b25ca2 Makefile: build default acrn.efi with nuc6cayh
To be back compatible, the default acrn.efi should be built when
BOARD param is nuc6cayh, because apl-nuc was overridden to nuc6cayh
in acrn-hypervisor/Makefile;

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-29 15:09:38 +08:00
Shuang Zheng 4f9c2f3a7a acrn-config: fix the issue config app failed to generate patch for a new board
fix the issue: WebUI could not generate configuration patch for a new imported board

Tracked-On: #3760
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-09-27 16:36:13 +08:00
Shuang Zheng bdf3a89e6d acrn-config: change source file format to unix
The file format of 2 source files is dos format with line endings
as CRLF, change to unix format with line endings as LF.

Tracked-On: #3760
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2019-09-27 16:36:13 +08:00
Wei Liu 9ddcb3dde8 acrn-config: remove ethernet device from pass through config
align with sample launch script for Preempt-RT Linux, remove ethernet
device from config file.

v1-v2:
    1). correct desc for ethernet device

Tracked-On: #3751
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-27 15:12:14 +08:00
Victor Sun 9c46354311 acrn-config: remove hvlog support for generic board
hvlog is for debug purpose and its address is board specific,
so remove the param in sos cmdline.

If user want to support hvlog in his own board, then he can add
the param in sos cmdline manually.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:57:33 +08:00
Victor Sun 79d6dc1fa7 acrn-config: add apl-up2-n3350 config xmls
ATOM-N3350 only has two cores, so we only support SDC and
logical_partition scenario.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:57:33 +08:00
Victor Sun 25544e31b7 acrn-config: update board xml of apl-up2
Change default apl-up2 CPU support from ATOM-N3350 to ATOM-N4200.
For apl-up2 N3350 support, we will add another apl-up2-n3350 board xml.

Tracked-On: #3602

Signed-off-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:57:33 +08:00
Wei Liu 172d5ee6e5 acrn-config: update README for acrn-config
align the usage of acrn-config tool and their README

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:55:09 +08:00
Wei Liu d35ca113d9 acrn-config: reserve 16M memory for hv start
Need to reserved 16M for HV debug usage like sbuf/ramoops before HV RAM START
to avoid possible conflict with HV memory.

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:55:09 +08:00
Wei Liu 6d7592b7cb acrn-config: fix parameter error in launch script
1. fix duplicated '-s 1:0,lpc'
2. fix extra '-l'
3. fix wrong uuid parameter

v1-v2:
    1). remove ethernet pass through to keep align with sample script

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-09-23 20:55:09 +08:00
Victor Sun 5d7d7cf910 acrn-config: add launch sample xmls for acrn-config
add launch sample xmls for acrn-config to generate launch scripts.

launch script will generated by acrn-config/launch_config tool,
acrn-config/launch_config need launch config xml as input.

Tracked-On: #3602
Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2019-09-20 14:39:48 +08:00
Wei Liu 86e73a4610 acrn-config: generate launch script file and apply to the souce file
1. generate launch script file and apply to the source file

usage: launch_cfg_gen.py [h]--board <board_info_file> --scenario <scenario_info_file>
		--launch <launch_info_file> --uosid <uosid id>
board_info_file :  file name of the board info
scenario_info_file :  file name of the scenario info
launch_info_file :  file name of the launch info
uosid :  the uos id which to launch:[0..max uos id]

sample:
    $ python3 launch_cfg_gen.py --board ../xmls/board-xmls/apl-mrb.xml
      --scenario ../xmls/config-xmls/apl-mrb/sdc.xml
      --launch ../xmls/launch_config/mrb_launch.xml --uosid 0

v1-v2:
    1). usage: '--vm' -> '--uosid'
    2). add 'uuid' option for acrn-dm
    3). support parse tag from 'rootfs' to 'rootfs_dev'
    4). support parse tag from 'hard_rtos' to 'Preempt-Rt Linux'
    5). support pasre tag from 'redirect_console' to 'console_type'
    6). add 'nvme' passthrough option
    7). modify uos_type to upper string in webUI
    8). support to generate launch file by uosid, this map to scenario
id

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2019-09-20 14:39:48 +08:00
Wei Liu 911be1d3b6 acrn-config: modify rootfs tag in board information
1. grap 'ext4' rootfs, and store it as "BLOCK_DEVICE_INFO" tag
2. remove 'Tab' from app tools
3. add support to parse ' ' from scenario xml

v1-v2:
    1). modify the board info "ROOT_DEVICE_INFO" -> "BLOCK_DEVICE_INFO"

Tracked-On: #3602
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2019-09-20 14:39:48 +08:00