Commit Graph

284 Commits

Author SHA1 Message Date
Zide Chen 0629c5c8c2 hv/acrn-config: changed name from cpu_affinity_bitmap to cpu_affinity
Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-05-08 11:04:31 +08:00
Wei Liu da749bcf84 acrn-config: update tgl-rvp board information
Update tgl-rvp board information.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-05-06 11:37:14 +08:00
Wei Liu 0a3ca1974e acrn-config: fix log macros for board defconfig
fix macros log level for board defconfig.

Tracked-On: #4752
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu d03d6e96e0 acrn-config: add clearlinux UOS for launch config xmls
add 6 clearlinux UOSes for launch config xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu 1d1270766c acrn-config: enable gvtd for waag for nuc7/nuc6 board
enable gvtd for waag of nuc7/nuc6 board by default.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu a94f04fb94 acrn-config: add 4 POST_STD_VM and 1 KATA_VM for industry config xmls
For nuc7/nuc6/whl-ipci5/whl-ipc-i7 board, add 4 POST_STD_VM and 1
KATA_VM in their industry config xmls, and assign PCPU0-1 to these
PRE_LAUNCHED_VM.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu db14c2f89f acrn-config: parse KATA VM count number with vm_type 'KATA_VM'
Parse KATA VM count number from scenario config with vm_type 'KATA_VM'
and Remove MAX_KATA_VM_NUM from scenario config xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu 5936bf431c acrn-config: refine slot assignment for launch config
When passthrough device for VM, if there is no fun0 of the slot was passed
in, PCI expansion card can not respond as a device, it must implement at
least function number 0.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-29 09:52:37 +08:00
Wei Liu c8eda07323 acrn-config: refinement for CPU affinity check
Refine CPU affinity sanity check for both scenario and launch config
xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-29 09:52:37 +08:00
Wei Liu 3078595da5 acrn-config: add vm type sanity check
Refinement for VM type sanity check relays on VM UUID number.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu 539905e1f4 acrn-config: refinement for pci_devs in scenario config xmls
remove configurable="0" for pci_devs of pre-launched VM so that the
passthru devices could be configurable on webUI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu a43b42b2a0 acrn-config: parse cpu_affinity from launch config xmls
Parse cpu_affinity from launch config xmls and generate '--cpu_affinity' as
acrn-dm args.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu 233f2deb4b acrn-config: add cpu_affinity for launch config xmls
1.Remove cpu_sharing item from launch config xml.
2.Add cpu_affinity for launch config xmls to configurable POST VM cpu
affinity from webUI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Zide Chen 1e3df01362 acrn-config: update cpu_affinity in scenrio configuration xml files
Change the tag name from "vcpu_affinity" to 'cpu_affinity" in all the per
board scenario xml files, and change the descritpions.

Tracked-On: #4641
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-23 09:38:54 +08:00
Zide Chen fafce7aa5f acrn-config: change names for vcpu_affinity[] related items
hypervisor is replacing vm_configs[].vcpu_affinity[] array with
cpu_affinity_bitmap, the meaning of which has some changes as well.

This patch changes the names in generated vm_configuration.c:
-.vcpu_affinity = VMx_CONFIG_VCPU_AFFINITY,
+.cpu_affinity_bitmap = VMx_CONFIG_CPU_AFFINITY,

Changes in vm_configuration.h:
-#define  VMx_CONFIG_VCPU_AFFINITY {AFFINITY_CPU(xU), AFFINITY_CPU(xU)}
+#define  VMx_CONFIG_CPU_AFFINITY  (AFFINITY_CPU(xU) | AFFINITY_CPU(xU))

Also don't generate default assignment of vcpu_num in vm_configuration.c,
because now hypervisor can easily calculate it from cpu_affinity_bitmap.

Accordingly, in the scenario xml files, tag "vcpu_affinity" is changed
to "cpu_affinity".

Tracked-On: #4641
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-23 09:38:54 +08:00
Shuang Zheng f7594f0a93 acrn-config: assign VM IDs for dynamic scenario and launch setting
When dynamically creating or adding or deleting VMs, acrn config app
will assign VM IDs for the VMs with the orders of prelaunched VMs and SOS
VM and postlaunched VMs to be consistent with the VM order of vm_configs
in vm configuration. When dynamically creating launch scripts, acrn
config app will let users to specify the VM ID before launch setting.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Shuang Zheng 44ec68dc49 acrn-config: add attributes for scenario and launch setting
There are no board/scenario/uos_launcher attributes for created
scenario and launch settings, which causes xml mismatch error
when generating configuration files or launch scripts.
This patch is to add the attributes for scearnio and launch
settings.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu ea61900a80 acrn-config: add max VM count check when generating scenario XML file
Add max VM count check when generating scenario XML file.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu 374cd99ed9 acrn-config: refine template xmls
Refine some items for configuarable="0"

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu 71b3743a75 acrn-config: add 2 UUIDs for post-launched Standard VM
Add 2 UUIDs for post-launched Standard VM.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Victor Sun 27fb606d7a acrn-config: add SOS_IDLE for SOS cmdline
Add SOS_IDLE for SOS cmdline so that "idle=halt" paramter will be needed
only when CPU sharing is enabled;

Tracked-On: #4329

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-04-22 14:49:04 +08:00
Geoffroy Van Cutsem b22d9e5e15 acrn-config: fix typos and text in board_parser.py tool
Enhance and fix some typos in the text that gets printed out from the
board_parser.py script.

Tracked-On: #4630
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-04-22 10:42:54 +08:00
Wei Liu 28ef2f509b acrn-config: remove sdc2 config xmls
Remove sdc2 scenario since the VM launch requirement under this scenario
will be satisfied by industry scenario.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 72892926c8 acrn-config: refine the HV_RAM_SIZE/HV_RAM_START for board_defconfig
Leave HV_RAM_SIZE/HV_RAM_START default to blank, and config tool would
generate for them, otherwise, they would be set by the UI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu a1a8807268 acrn-config: set HV_RAM_SIZE/HV_RAM_START to blank from config xmls
Leave HV_RAM_SIZE/HV_RAM_START default to blank, and config tool would
generate for them, otherwise, they would be set by the UI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 602c87acb8 acrn-config: refine template xmls
1. Set default value for HV template.
2. Refine vuartx in template vm setting xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 369547aa63 acrn-config: modify epc_section to configurable="0"
1. modify epc_section to configurable="0".
2. add 'idle=halt' for sos bootargs to impove performance.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu d4236bc02d acrn-config: fix syntax for new logical partition xmls
UI got syntax warning while loading new logical partitons xml, add
missed '</clos>' for it.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu b69e2685d5 acrn-config: refine GPU vpid format for launch script
Refine GPU vpid format for launch script.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu a0e18eec34 acrn-config: refine '--out' for config tool
Currently, '--out' is relative scripts run dir if it gets relative path,
Refine '--out' to source root tree if it gets relative path.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Sainath Grandhi c548ba10b9 acrn-config: Generate info in pci_dev file for Pre-Launched VMs
Pre-Launched VMs need the vbar_base values pre-populated
for pass-thru PCI devices.

This patch moves the pci parser logic from board_cfg_gen to library
so that scenario_cfg_gen scripts can use pci parser routines while
generating pci_dev file logical partition scenario.

Tracked-On: #4666
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-04-20 21:59:23 +08:00
Victor Sun 09212cf4b6 HV: Kconfig: enable CPU sharing by default
The patch enables CPU sharing feature by default, the default scheduler is
set to SCHED_BVT;

Tracked-On: #4661

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-04-20 14:59:23 +08:00
Yin Fengwei 345cb77376 crashlog: fix build issue under latest clearlinux
gcc in latest clearlinux enabled the pointer-sign warning as
default. This breaks the acrn-crashlog build.

Make acrn-crashlog build issue fixed by convert to correct
pointer type.

Tracked-On: #4636
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2020-04-20 14:54:33 +08:00
Shuang Zheng 6aeadb9cbb acrn-config: add template xmls for dynamic config
The template xmls are used to be the dafault VM settings for dynamically
adding VMs.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Shuang Zheng b9ce7617cd acrn-config: dynamic configuration for scenario setting and launch setting
config app implements interfaces to dynamically:
    create new scenario settings based on tempaltes;
    create new launch settings based on templates;
    add or delete VMs for scenario settings;
    add or delete VMs for launch settings;
    load default scenario or launch settings

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu ccef1af1f0 acrn-config: remove hard code UUID from config xmls
To keep align hv source code changes, config tool doese below changes:
1. Remove UUID from scenario config files.
2. Remove severity from scenario config files.
3. Use vm type to instead load order type.
4. Use the mapped UUID data base for launch vm script configurations.
5. Unify the ui_entry_api for '--out'

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu eb341caa83 acrn-config: Use vm_type to instead load_type/uuid/severity in config
Use vm_type to instead combination of load_type/uuid/severity in config
xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu eba8c23bff acrn-config: support to parse pci_devs for pre launched vm
As it doesn't depends on the scenario, there are sos/pre launched VMS
in config xmls, emulate vhostbridge for sos vm, specify the pass-thru
PCI device for pre launched vm.
Add support to parse pci_devs for pre launched vm.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu 8fbd859fbf acrn-config: add pass-thru PCI device for pre launched vm xmls
Add pass-thru PCI device for pre launched vm section in config xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu c967c0d522 acrn-config: remove 'scenario' dependency from acrn config tool
For purpose weaken 'scenario' from config tool, remove 'scenario' dependency
from config tool.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Mingqiang Chi 2b648476cc life_mngr:fix resend shutdown cmd fail
1) fix a bug,resend shutdown cmd only send one character
2) move out accept routine from while loop, let this thread
   can read data from acrn-dm continuously.

Tracked-On: #4446
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Yuhong Tao <yuhong.tao@intel.com>
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2020-04-16 22:04:53 +08:00
Naveen Saini fc5292e354 acrnprobe: avoid race condition
main.c is compiled while version.h being generated. This will
result following error:

| main.c: In function 'main':
| main.c:95:5: error: 'AP_MAJOR_VERSION' undeclared (first use in this function)
|    95 |     AP_MAJOR_VERSION, AP_MINOR_VERSION,
|       |     ^~~~~~~~~~~~~~~~
| main.c:95:5: note: each undeclared identifier is reported only once for each function it appears in
| main.c:95:23: error: 'AP_MINOR_VERSION' undeclared (first use in this function)
|    95 |     AP_MAJOR_VERSION, AP_MINOR_VERSION,
|       |                       ^~~~~~~~~~~~~~~~
| main.c:96:5: error: 'AP_BUILD_VERSION' undeclared (first use in this function)
|    96 |     AP_BUILD_VERSION, AP_BUILD_USER,
|       |     ^~~~~~~~~~~~~~~~
| main.c:96:23: error: 'AP_BUILD_USER' undeclared (first use in this function)
|    96 |     AP_BUILD_VERSION, AP_BUILD_USER,
|       |                       ^~~~~~~~~~~~~
| main.c:97:5: error: 'AP_BUILD_TIME' undeclared (first use in this function)
|    97 |     AP_BUILD_TIME);
|       |     ^~~~~~~~~~~~~

Similar issues observed with usercrash too.

To fix this, add version.h header as dependency, to make sure
it is generated successfully.

Tracked-On: #4590

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2020-04-16 21:49:18 +08:00
Shuang Zheng b9583f42e9 acrn-config: enable hv config for scenarion setting UI
config app supports hv config in scenario setting UI.

Tracked-On: #4634
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked by: Terry Zou <terry.zou@intel.com>
2020-04-16 08:50:31 +08:00
Wei Liu b4a61abe45 acrn-config: add hv configurations to scenario config xmls
Update the board defconfig to scenario config xmls, and user can configure
it from webUI.

Tracked-On: #4634
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-16 08:50:31 +08:00
Wei Liu b30d304d69 acrn-config: add support to parse board defconfig from configurations
Board defconfig depends on hypervisor configurations and vm configurations,
add this to support to parse board defconfig from vm configuration.

Tracked-On: #4634
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-16 08:50:31 +08:00
Wei Liu 138c3aeadd acrn-config: support passthroug GVT for WaaG by default
Modify launch config tool to support passthroug GVT for WaaG by default.

Tracked-On: #4625
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-15 15:28:14 +08:00
Sainath Grandhi e14cafe412 acrn-config: round HI_MMIO_START/HI_MMIO_END to the closest 1G
Rounding HI_MMIO_START, HI_MMIO_END to the closest 1G. This avoids
round up logic in the hypervisor.

Tracked-On: #4586
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-04-13 16:52:18 +08:00
Wei Liu 793e22a87a acrn-config: remove the same parameters and functions from launch_cfg_lib
Launch config should relay on library/common.py and launch_cfg_lib,
then remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00
Wei Liu ba3c531e50 acrn-config: remove the same parameters and functions from scenario_cfg_lib
Scenario config should relay on library/common.py and scenario_cfg_lib,
then remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00
Wei Liu ed8ac484ad acrn-config: remove the same parameters and functions from board_cfg_lib
Board config should relay on library/common.py and board_cfg_lib, then
remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00