Commit Graph

1336 Commits

Author SHA1 Message Date
Weiyi Feng 0c80f44383 config_tools: filter all pre launched pcpu for service vm's cat data
filter all pre launched pcpu for service vm's cat data

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Conghui 73e8a2fcc9 config-tools: fix bug for saving files
The clean scripts function is a async function, it may run after saving
launch scripts and remove all the launch scripts by accident.
So, add '.then' to make it work as a sync function.

Tracked-On: #7641
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 06fb8e80f8 config_tools: fix service vm CAT data not complete issue
fix service vm CAT data not complete issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 101ac317ac config_tools: show scenario data error when load scenario
show scenario data errors when load scenario

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 11204a378d config_tools: check cat capability info in cat info parser
check cat capability info in cat info parser

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Conghui 4ab74ffb3e config-tools: add tooltips
Add tooltips for vUART, IVSHMEM and CAT.
Other tiny fix.

Tracked-On: #7639
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-06-29 13:53:42 +08:00
Wu Zhou ea47aa52ed config-tools: refine vsock UI
1. One VM can have multi vsock. Changed vsock UI to multi line.
2. Add verification that no repeated CID is allowed.
3. Refine the tooltip text.

Tracked-On: #7637
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 0a810de7d2 misc: add HV_RAM_START to fix multiboot relocation issue
The current code have remove the HV_RAM_START from config tool which
will cause the multiboot relocation issue.

This patch resume HV_RAM_START config to fix the above issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 1e9836caa8 config_tools: fix cpu_affinity cannot display issue
fix cpu_affinity cannot display issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 739d267f02 config_tools: refine configurator CAT checkbox data binding
refine configurator CAT checkbox data binding

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 3fa619f776 config_tools: fix data loss issue method 1
fix data loss issue method 1

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao 4c18b36430 config_tools: add default values to I/O ports of vUART
Similar to 5bd3e9642 ("config_tools: add default values to vBDF of vUART
and IVSHMEM"), this patch adds default values to the I/O ports of vUART
which shall also keep unique among all vUART endpoints of the same VM.

In order not to overlap with the (potentially used) COM ports, a different
range starting from 0x9200 is selected as defaults. Users are still free to
customize them to COM ports if intended.

Tracked-On: #7330
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Calvin Zhang 24b5637479 misc: config_tool: fix passthrough device options in launch script
"enable_ptm" and "d3hot_reset" failed to pass to acrn-dm because of
shell syntax error (arguments are separated by space, not comma).

Remove "igd-vf" as it's no longer needed.

Tracked-On: #7623
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-06-29 13:53:42 +08:00
Junjie Mao e42d323459 config_tools: pretty-print JSON schema violations
The default error messages provided by the ajv validation library read like
this:

    * must have required property MEMORY.STACK_SIZE

    * must match pattern "<a regular expression>"

Such messages may look confusing as users are not supposed to understand
the internal naming of the config items or the regular expressions used to
validate strings.

This patch enables the XML schema to include 'acrn:errormsg' annotations
which is a dictionary from error types to customized error messages. This
mechanism is used to show more user-friendly messages upon common errors
such as missing or invalid data in required config item.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Yifan Liu 8042806676 misc: configurator: Fix vUART and IVSHMEM select box missing problem
When user adds a vUART or IVSHMEM region and select VMs in selection
list, deleting the selected VM could break the selection box.

This patch adds a state check against null and undefined value.

Tracked-On: #7624
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 5ad5213aeb config_tools: fix load board issue
fix load board issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng cad2b7e3bf config_tools: fix service vm cat settings
Sometimes service vm cat settings will not generate successfully, now fix it.

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 7273cb5449 config_tools: remove footer version link
remove footer version link

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng bb1522f0b1 config_tools: add vcat support for configurator
add vcat support

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Yuanyuan Zhao b24ff3debf config_tools: merge python packages list for configurator
Merge python packages list into one 'requirements.txt'.
And modify related document.

Tracked-On: #7508
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-06-08 12:53:51 +08:00
Yuanyuan Zhao 6ae6ffcf40 config_tools: use python3 in configurator clean
Use python3 in configurator clean for Debian-based Linux is preferred
in this case.

Tracked-On: #7508
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-06-08 12:53:51 +08:00
David B. Kinder 6f65f78016 Change sense of some schema config options
The MCE, split lock, and UC lock checkboxes have a unique behavior.
Selecting the checkbox disables the feature. We proposed changing the
behavior, so that the checkbox enables the feature, but the fix is
postponed to v3.1.  Change the sense of these option's tooltip and title
to reflect their current behavior (Disabling vs. normal Enabling).

Tracked-On: #7661

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-02 14:39:30 +08:00
Geoffroy Van Cutsem 2f15bd1e3f Packaging: update Debian packaging script to reflect all valid targets
Update the Debian packaging script to list all the valid options for the first
argument, specifically 'acrn_all', 'board_inspector', 'configurator' and
'clean'.

Tracked-On: #7646
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-05-31 19:26:28 +08:00
Chenli Wei 8331375172 misc: refine CDP mode
The current code use cache type to check whether enable the CDP mode,
then merge policy by clos_mask, sometimes the data and code CLOS is not
continuous.

This patch add a special CDP policy to record and merge policy to fix
this above issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-30 09:23:33 +08:00
Chenli Wei 534334852d misc: add match interface for RDT policy
The current code use a merge interface to merge policy which fix match
and merge in one function.

This patch split the merge interface and add a match interface to check
whether this policy could be merged.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-30 09:23:33 +08:00
Wu Zhou 77d52ae661 config-tools: remove empty cache_region entry
Currently the empty cache_regions are saved to scenario file. It is
useless, and unable to pass the load/build validation check, causing
build fail.

This patch add a filter to the empty cache_region entry, so that the
load/build validation check may pass.

Tracked-On: #7609
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-29 22:56:29 +08:00
David B. Kinder 95c88b1732 config: remove extraneous headings in UI
DX recommendation is to remove some extraneous titles from the
configurator UI, specifically "Memory", "Hypervisor Features", and "PCI
device assignment"

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-29 12:54:56 +08:00
Chenli Wei f993cd4b86 misc: add assert for duplicate vUART io_port
The current UI allow user use duplicate vUART io_port for same VM, it's
an issue.

This patch add assert check it.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-27 13:57:32 +08:00
David B. Kinder d6069277b5 move buildtype above debugoptions in the scenario schema
DX/UI recommendation is to move the build type parameter outside of the
debugoptions section.  This breaks existing schema files, so also update
scenario XML files in the code tree to match.

Update the xforms xsl script with the same change to the buildtype
option location in schema XML files.

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-27 09:18:36 +08:00
Junjie Mao ba2ea5503f config_tools: fix move_enablement in the upgrader
The EnablementType is now obsolete and config items having this type have
been updated to use the Boolean type. However, the upgrader is not changed
accordingly and it still converts "y" or "n" of certain config items to
"Enable" or "Disable".

This patch drops the EnablementType in the schema and updates the upgrader
to respect the latest definitions.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-27 00:00:30 +08:00
Ziheng Li 7c8231f8b1 misc: remove clos element for vCAT refine
Updated the scenario xml file in misc/config-tools/data folder,
and deleted the clos node in xml file.

Tracked-On: #6690
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-26 22:02:09 +08:00
Chenli Wei 5bc55d352f misc: refine clos and vCAT element
The current UI "Maximum virtual CLOS" above the "VM Virtual Cache
Allocation Tech", it's not user-friendly, and the clos element was not
used by vCAT feature.

This patch move the "virtual_cat_number" element and remove the unused
node from schema.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-26 22:02:09 +08:00
Yuanyuan Zhao 5d2ceb3860 config_tools: hide vm_type for Service VM
For Service OS, 'vm_type' should not be modified.
Delete it from 'ServiceVMBasicConfigType' to forbid unexpected error.

Tracked-On: #7528
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-26 20:52:45 +08:00
Calvin Zhang 1164d2de8d misc: configurator: Delete old .board.xml after reselect a new one
Delete old .board.xml after reselect a new one so that there will be
only one working .board.xml in working directory

Tracked-On: #7597
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-26 17:27:51 +08:00
David B. Kinder 72d0348491 config: additional DX/UI option layout and descriptions
Add additional DX/UI option changes

* Remove description of hypervisor features
* Move vuart connection before debug options
* delete memory options description
* delete hypervisor capacities description
* move cpu affinity before virtual USB HDI
* move memory size right after os type
* add "device assignment" to virtual USB HDI title
* delete usb device assignment description

Also fixed some typos found in descriptions.

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-26 16:36:12 +08:00
Kunhui-Li bbd3ff325d config_tools: hide "PCI" option for Console virtual UART type
It's unexpected to show the "PCI" option for Console virtual UART type
currently, so this patch hide it in configurator.

Tracked-On: #7592
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-26 15:59:51 +08:00
Kunhui-Li ef8c092bb0 config_tools: bugfix for saving all enum values
fix the issue that saves all enum values are saved in scenario xml file
if user doesn't select any value in configurator.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-26 15:59:51 +08:00
Kunhui-Li 5cfc7aa381 config_tools: rename "Virtio console" to "virtio serial port (as console)"
virtio serial port and virtio console are all based on virito serial port.
but virtio serial port functionally can not be used as console,
which may lead to user confusion, so explicitly specify the point by
changing the item name as follows:
Virtio console -> virtio serial port (as console)

Tracked-On: #7540
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-26 15:59:51 +08:00
Calvin Zhang f98840c023 misc: config_tool: Add udmabuf.list_limit=8192 to ServiceVM bootargs
Add udmabuf.list_limit=8192 to ServiceVM bootargs for virtio gpu. It's
harmless if not used.

Tracked-On: #7581
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-26 15:26:06 +08:00
Wu Zhou 1f0c5a0228 config-tools: refine the vuart widget's text
The labels and titles in vuart widget are hard-coded in the .vue file
rather than exposing the text from XSD file. This patch fixed it.

Tracked-On: #7562

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-26 10:12:38 +08:00
Kunhui-Li 957e9f8143 config_tools: use legacy as default vaurt type
use legacy as default vaurt type on the nuc11 platform.

Tracked-On: #7556
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-25 18:37:41 +08:00
Kunhui-Li a8d592093d config_tools: bugfix for the generated launch script without uart parameters
bugfix for the generated launch script without uart parameters
after VUART is configured to "pci"

Tracked-On: #7556
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-25 18:37:41 +08:00
Conghui f3d4dbfb8d config-tools: fix board import bug
Only import board with special suffix: .board.xml

Tracked-On: #7571
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-25 15:22:29 +08:00
Chenli Wei f1f9dcfb9c misc: CPU affinity error message cleanup
The current UI display "report on" message, it's not by design, so this
patch remove these message.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-25 14:56:48 +08:00
Chenli Wei 5564943364 misc: modify IVSHMEM virtual BDF validation check
The current UI force user input BDF which could automatically fill it
in if it is blank, so it an optional.

This patch change the BDF to an optional.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-25 14:33:31 +08:00
Calvin Zhang 17d8eaa7ae misc: configurator: Add entry "None" to HV console selector
Add an explicit "None" entry in HV console selector if user would like
to disable debug console or there is no serial console available.

Tracked-On: #7546
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-24 17:14:38 +08:00
jackwhich 579e5247fb config-tools: Fix Enable SR-IOV build fail
Because SR-IOV is enabled to obtain board xml,
the xpath address cannot resolve the @address='0x20000' address.
cause the build to fail. fix build issues

Tracked-On: #7371
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-05-24 16:07:16 +08:00
Ziheng Li 57994b6d34 [config_tool] IVSHMEM changes to Configurator 05.06 build
Refined region name issue in IVSHMEM_REGION.vue.

Tracked-On: #7553
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-24 15:29:34 +08:00
Yifan Liu 2ff11c2ef0 misc: Remove cpu_affinity settings for Service VM
There are some scenarios XML that still sets cpu_affinity for Service
VM. Remove them as the Service VM CPU affinity will be automatically
calculated.

Tracked-On: #7538
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-24 14:16:28 +08:00
Yifan Liu c7f3f6fc8c misc: Add applicable-vms to cpu_affinity
Currently setting cpu_affinity for service vm has no effect. This patch
sets acrn:applicable-vms of cpu_affinity to pre-launched VMs and
post-launched VMs to restrict validation and UI display.

Tracked-On: #7538
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-24 14:16:28 +08:00
Conghui f5e58e6f33 config-tools: use VMname instead of VMId
Show VMname in the warning window when trying to delete a VM from UI.

Tracked-On: #7532
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-24 12:48:20 +08:00
Chenli Wei 1dd5060e9e misc: modify the non stand s5 vUART generate logic
The legacy code get all non-stand vUARTs from scenario_etree and generate
the serial.conf, now we need add more non-stand vUARTs which was config
by offline tool and record by allocation_etree.

This patch add allocation_etree to the list, then add all non-stand
vUART to serial.conf which will config by SERVICE VM.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-24 11:44:03 +08:00
Weiyi Feng a2cf3ac46b config_tools: add set default function for cat widget
add set default function for cat widget

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-24 10:57:45 +08:00
Chenli Wei bfa91dccfc misc: hide RDT for basic mode
The current RDT element display for basic and advance mode, it not
necessary, so this patch hide RDT for basic mode.

Tracked-On: #6690
Signed-off-by: Chenli Wei chenli.wei@intel.com
2022-05-24 10:15:55 +08:00
Chenli Wei de13c67b9d misc: fix the physical memory segmentation UI issue
Current physical memory segmentation UI have an redundant title when
user select the advance mode, so we set the MemoryInfo element title
to NULL to fix this issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-23 17:46:42 +08:00
Wu Zhou ed70da3ed6 config-tools: change the tooltip width to 60%
Tooltip width was set to 50%. This could not just cut the line into
2 lines, for the line has to be cut by word. This would leave one
word on a new line, looks weird.

Set to 60% will solve this issue.

Tracked-On: #7541

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-23 17:17:55 +08:00
Kunhui-Li 56602a42f0 config_tools: add restriction for Maximum Virtual CLOS configuration
Add restriction for Maximum Virtual CLOS configuration that don't allow
negative numbers.

Tracked-On: #7530
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-23 16:38:04 +08:00
Kunhui-Li af10a3bb0a config_tools: hide tty and sock in UI
For virtio console, in order to hide tty and sock backend types,
change "xs:sequence" to "xs:all" in the XML schema
to slice the backend type list and update backend type to
"BasicVirtioConsoleBackendType" to call the sliced value.

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-23 16:38:04 +08:00
Conghui 57e0b966e9 config-tools: bugfix for saving configuration
When user delete all the VMs from UI, and click 'Save' button, a warning
message should appear to show that at least one VM is needed.

Tracked-On: #7532
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-23 15:37:58 +08:00
Conghui 73f0d2795d config-tools: clean launch scripts before saving
Clean all launch scripts before click "Save" button, the new launch
scripts will be created after that.

Add a blank line to the warning dialog box.

Tracked-On: #7532
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-23 15:37:58 +08:00
Conghui 38905c663f config-tools: change dialog box message
Change dialog box message when click "Use a Different Board" button.

Tracked-On: #7532
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-23 15:37:58 +08:00
Wu Zhou 59ec4cf6c2 config-tools: add vsock option in configurator
vsock is the new socket address family for host/guest communication.
Configurator option for vsock CID is added in this patch.
Also vsock parameter is generated in script.

Tracked-On: #7535
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-23 14:44:25 +08:00
Weiyi Feng 84550004dd config_tools: add custom CAT widget
add custom CAT widget

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-22 20:10:24 +08:00
Weiyi Feng 8ffbcc22ce config_tools: fix Windows config_tools package build script
fix error return code of config_tools python package build script in Windows environment

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-22 20:10:24 +08:00
Weiyi Feng b288ae9ce7 config_tools: ignore cache in develop env
ignore cache in develop env

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-22 20:10:24 +08:00
Conghui 6a0ada0a91 config-tools: change name for board XML
Use file name as the board xml name instead of using the name in
'board' field in board XML.

e.g.

1. Initial filename is "my_potato.xml"
2. User imports my_potato.xml into the Configurator
3. Resulting file is my_potato.board.xml

Tracked-On: #7521
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-21 23:23:02 +08:00
Conghui 777cfae536 config-tools: change warning message
Change warning message for deleting pre-launched VM and post-launched VM.

Tracked-On: #7524
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-21 20:03:01 +08:00
Conghui b4306fa1ee config-tools: correct the confirm log
When clicking the Save button in UI, the log message is incorrect for
pre-launched VM.
Do not show 'launch script' related message when there is only pre-launched
VMs.

Tracked-On: #7524
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-21 20:03:01 +08:00
Calvin Zhang 4e2abfb473 misc: configurator: add check for uniqueness of cpus in Pre-launched VM
CPUs assigned to Pre-launched VM can not be shared. Add a xsd rule to
check it.

Tracked-On: #7526
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-20 18:55:10 +08:00
Calvin Zhang 8a6445d949 misc: configurator: Remove acrn config files when selecting a working folder
Instead of removing all .xml and .sh files, just remove:
*.board.xml
scenario.xml
launch*.sh

Tracked-On: #7495
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-20 17:22:53 +08:00
Ziheng Li 72054f57fa [config_tool] Duplicate VM name
refine error messages.

Tracked-On: projectacrn#7519
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-20 16:53:48 +08:00
Junjie Mao be2e411f33 config_tools: fix option passing to device model in launch scripts
Generated launch scripts tracks the options to ACRN device model in an
array `dm_params`. Those scripts use `${dm_params[*]}` to join all
elements in the array and pass the joined string to acrn-dm.

One tricky thing about `${dm_params[*]}` is that it joins the array
elements as one single unquoted string. This means an option as a string
with whitespaces will be split by the shell and passed to acrn-dm as
multiple options. This does not happen to the options generated today, but
prevents users from using, e.g., the -B option to pass the full command
line options for the guest kernel.

Rather than joining all elements as an unquoted string, it is more
preferrable to treat each element in `dm_params` as a quoted string. This
patch does this by:

  1. replacing `${dm_params[*]}` with `"{dm_params[@]}"`, and

  2. removing the quotes around plaintext options in `dm_params`.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-20 15:54:56 +08:00
Yuanyuan Zhao 3d62043c7b config_tool: add 'make clean' to local directory
This patch use 'make clean' to clean up the files left after
a 'make configurator'.

Tracked-On: #7508
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-20 14:25:33 +08:00
hangliu1 82232f7f75 misc: configurator:Fix delete vm button apearance
update activeVMID to make the delete vm button disappear
when all VMs are deleted.

Tracked-On: #7516
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-20 13:37:46 +08:00
David B. Kinder c60c89d3de config: restore FEATURES on the basic tab
A previous PR incorectly removed the hypervisor FEATURES options on the
basic tab because all options were advanced.  One wasn't (IVSHMEM).

Tracked-on: #7514

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-20 11:54:36 +08:00
Chenli Wei f7094466cb misc: add the define of MAX_IR_ENTRIES
The current code align MAX_IR_ENTRIES with the roundup to 2^n of the
CONFIG_MAX_PT_IRQ_ENTRIES, there is an issue of the powerof2_roundup to
calculate the macro, and the code style is very ugly when we use macro
to fix it.

So this patch move the calculate and define of MAX_IR_ENTRIES to offline
tool.

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-20 09:08:47 +08:00
Calvin Zhang 12b81d83ca misc: configurator: validate user settings before writing down
After clicking save button, validate settings before writing down
scenario.xml, otherwise broken scenario.xml will be generated.

Tracked-On: #7470
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-19 16:50:15 +08:00
Wu Zhou eac0e335a8 config-tools: add validation to vuart widget
vuart widget don't have empty line check for required fields.
Added in this patch.

Tracked-On: #7506
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-19 13:15:23 +08:00
Wu Zhou c4216a3817 config-tools: vuart widget's vm_name changes when edited
When vm_name is edited in in the vm tab, the vuart connection widget's
vm_name field should change to the new name. Add name replacing in form
change event.

Tracked-On: #7506
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-19 13:15:23 +08:00
Yuanyuan Zhao e106766b9e config_tools: add LAPIC passthrough to Service VM
Add LAPIC passthrough to Service VM advanced Parameters tab.

Tracked-On: #7502
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-19 10:47:08 +08:00
Calvin Zhang e4f11ca4c8 misc: configurator: report the errors on clicking save button
On clicking save button, current scenario configuration is validated and
errors should be prompted out if any.

BTW, fix unrecognized value in cpu affinity object.

Fixes: 5a3b38f778 ("config-tools: add confirm message")
Tracked-On: #7469
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-19 10:21:17 +08:00
Wu Zhou 7750a6c25b config-tools: add property check before IVSHMEM
If IVSHMEM is not presented, reading its property could lead to
failure in js. Add property check before it.

Tracked-On: #7500

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-05-19 09:54:40 +08:00
Junjie Mao c4f46d9c28 config_tools: gracefully process board XMLs with non-standard info
Occasionally the regular expressions searching for manufacturer and product
name of the target board fail to find a matching line in a given board XML,
possibly because the board XML does not contain such info. This causes an
alert to be raised while it does not impact the functionality of the
configurator.

This patch adds a check to suppress such alerts.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-19 09:31:46 +08:00
Junjie Mao 22a47fe795 config_tools: check XML file structures on load
This patch validates the structure of the XML files given before they are
further used by the rest of the configurator. With this validation process,
the configurator confirms the XML files are well-structured and can thus
access certain nodes and contents without checking their existence or data
types.

Upon validation failure, an alert will pop up informing the user that the
given XML file is ill-formed. No further details are given as of now
because we assume users should not care about the internal structure of
those files.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-19 09:31:46 +08:00
Ziheng Li 54ff64acc1 board_inspector.py fails to run on target with clean Ubuntu installation
Python package is not in debian package, so put its installation
process in the acrn-board-inspector.postinst script

Tracked-On: projectacrn#7498
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-18 15:41:42 +08:00
Calvin Zhang a8a9b2f40a misc: configurator: remove config files when choosing a working folder
Instead of deleting all files, just remove xml and launch scripts.

Tracked-On: #7495
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-18 15:09:25 +08:00
Kunhui-Li 5c72036a67 config_tools: using XPATH expression to handle input data
XPATH 2.0 already supports functions like for-expressions,
so we use XPATH expression instead of the python code to format
virtio input data.

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-18 14:40:26 +08:00
Ziheng Li 859f6b803c [config_tool] Duplicate VM name
Added check and error prompt for duplicate names of VM
before save scenario.
Tracked-On: projectacrn#7486
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-18 13:22:34 +08:00
Wu Zhou 398184f3a6 config-tools: fix configurator build issue
Fix configurator build issue introduced by #7483

Tracked-On: #7492
2022-05-18 12:46:06 +08:00
Chenli Wei 0d05632c42 misc: add assert for vUART connection
The current UI have no live-check to check whether a VM connect to
itself.

So we add an assert to the schema and return error when user connect a
VM to itself.

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-18 10:39:10 +08:00
Calvin Zhang c7a797ac51 misc: configurator: Use more precise acrn version identifier
Display acrn version string from `git describe --dirty` at UI footer to
help testing. Append the same version to deb package name as well.

Tracked-On: #7488
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-17 13:25:50 +08:00
Wu Zhou 14ab083cc8 config-tools: add validation trigger to get instant result
The validation triggers 'change' happens only when data input completed.
Added 'blur', 'input', 'focus' to get instant result.

Tracked-On: #7481

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-17 11:26:10 +08:00
Wu Zhou 39490c72b1 config-tools: add validation to IVSHMEM widget
Add validation to IVSHMEM widget, displaying error msg below the
input line. Currently only check for empty line.

Tracked-On: #7481

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-17 11:26:10 +08:00
Yifan Liu 0adfe7a439 misc: configurator: Fix user-input working directory not working
User-input working directory will not work if there's no path split at
the end. This patch checks and adds if no path split at the end of
working directory path.

Tracked-On: #7484
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-17 11:00:59 +08:00
Kunhui-Li c1528cd479 config_tools: add virtio devices widget
This patch adds virtio devices widget according to the new design.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-16 14:28:46 +08:00
Kunhui-Li 3653b268ed config_tools: format vitio input in configurator
This patch formats virtio input entry as "Device name: xxx, Device physical path: xxx".

Tracked-On: #6691
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-16 14:28:46 +08:00
David B. Kinder 3a133d3138 Fix make configurator not picking up schema changes
Artificates left over from a previous make configurator build prevented
changes to a schema (.xsd) file from getting incorporated into a
subsequent make configurator build.

Tracked-on: #7461

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-16 09:43:26 +08:00
David B. Kinder 8ffb0dee4d schema changes for DX configurator option presentation
Edit the schema (.xsd) files to modify the order options are presented.
None of these changes invalidate existing scenario XML files, as they
only reorder elements within the existing parent element, or tweak the
acrn:views, acrn:title, or documentation content.

Move simple type elements before complex type options (under the same
parent element) to avoid the confusion where options look like they're
part of a section based on the title that's added before complex typed
options but not simple typed options.

* add acrn:title to pcpu (pCPU list)
* change documentation for binary option saying "checked" instead of 'y'
* move HYPERV_ENABLED before RDT (simple type before complex type)
* move vuart_connections before FEATURES
* move name before vm_type
* move console_vuart, os_type, vuart0, vbootloader, usb_xhci before
  lapic_passthrough
* add acrn:title to epc_section
* add acrn:title to memory
* move gpu to top of virtio_devices (simple type before completx type)

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-16 09:12:20 +08:00
Junjie Mao 72445d01b4 config_tools: add placeholders in input widgets
The configurator today shows "Please Input" as the placeholder of input
widgets, which is far from informative.

This patch specifies element or type specific placeholders in the XML
schema by reusing the `acrn:widget-options` annotation mechanism. For
manually-designed widgets such as ivshmem or vUART the placeholders are
added in the corresponding vue directly.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 15:50:20 +08:00
Chenli Wei c972aeae22 misc: define the MAX_VUART_NUM_PER_VM by offline tool
The current code define MAX_VUART_NUM_PER_VM for all VM and it's a hard
code which can't match our vUART logic which need dynamic setting.

This patch move the define of MAX_VUART_NUM_PER_VM to offline tool and
calculate it automatically.

Tracked-On: #8782
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 13:50:07 +08:00
Chenli Wei 2045577f12 misc: add vUART channel for s5 feature
"S5" is one of the ACPI sleep states which means the function to shut
down the VMs.

On ACRN, the User VM must be shut down before powering off the Service
VM, so we need a vUART channel to communicate between the Service VM
and User VMs.

This patch adds a vUART channel for each User VM connect to Service VM

Tracked-On: #8782
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-13 13:50:07 +08:00
Fei Li d625ce0677 misc: acrnd: fix a minor build Werror
The comparison ((argv + 1)) will always evaluate as 'true' for the pointer
operand in 'argv + 8' must not be NULL.

Tracked-On: #7453
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-05-13 12:57:32 +08:00
Yifan Liu 1651863584 misc: configurator: Fix minor bug of vUART label error
The connection label should be consistent with vUART name

Tracked-On: #7455
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-13 11:38:45 +08:00
Yuanyuan Zhao 27222e1583 config_tools: change JSON Schema source file
Use the JSON Schema convered while building.
The file will be updated in time.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
Yuanyuan Zhao 38c73cc6e2 config_tools: remove JSON Schema in repo
The JSON Schema converted from schema while building.
Remove the JSON Schema in repo.

Tracke-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
Yuanyuan Zhao db53f21404 config_tools: create json schema path
Create a temporary directroy to write JSON Schema while build packages.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-13 11:13:42 +08:00
lirui34 722561fbf5 config tool: fix d3hot_reset unbind tap create issue
The config tool supports auto add d3hot_reset option to
the windows vm script when user configure the usb passthru event,
but it's not handled in the template script or not the pci event
will not unbind successfully while launching the windows guest.
One more fix is for the existing tap network interface check function.

Tracked-On: #7363
Signed-off-by: lirui34 <ruix.li@intel.com>
2022-05-13 09:36:58 +08:00
hangliu1 3afb222d90 [config tool][doc]: remove old configurator
remove configurator in misc/config_tools/config_app, since
there is new configurator in misc/config_tools/configurator.
remove related document.

Tracked-On: #7466

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-12 15:42:26 +08:00
Weiyi Feng 856ef44bd7 config_tools: fix can't save cpu affinity config issue
fix can't save cpu affinity config issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-12 09:51:34 +08:00
Yuanyuan Zhao 9f08eeb999 config-tools: modify scenario.json in build directory
Copy scenrio.json to build directory, and modify the temporary file
to avoid pollution of hypervisor repo.

Tracked-On: #7459
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-12 09:29:27 +08:00
Yifan Liu 130266442e misc: configurator: Add vUART widget
Tracked-On: #7455
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-11 22:05:43 +08:00
Chenli Wei d5c0a40665 misc: modify the generate logic of vcat config
The current code generate vcat info by count the CLOS MASK and the
scenario xml should set multiple times.

It is not an ideal solution, so we add an "virtual_cat_number" element
to set the virtual CLOS number and get the MAX pcbm directly.

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-11 17:00:51 +08:00
Chenli Wei a1b266f807 misc: refine CLOS module for expansibility
This patch refine CLOS module by the following aspects:

1 Unified CACHE_ID type to Hex Format
2 Rewrite policy merge with RDT Class
3 Modify the logic of generate CPU mask

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-11 17:00:51 +08:00
Conghui f172502044 config-tools: bugfix for file related issue in UI
1. when using existing configuration, UI show the existing information.
2. remove launch script when removing post-launched VM.
3. new working folder created with no existing files.
4. automatically minimized.

Tracked-On: #7450
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-11 11:38:26 +08:00
Weiyi Feng c31cad225c config_tools: update project nodejs dependencies when windows build script run
update project nodejs dependencies when windows build script run

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Weiyi Feng 631de1d6fd config_tools: add default value for new vm cpu_affinity setting
add default value for new vm cpu_affinity setting

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Weiyi Feng b8d9e288bf config_tools: add custom cpu_affinity component
add custom cpu_affinity component

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Weiyi Feng ebef897088 config_tools: let windows build scripts auto exit when an error occurs
let windows build scripts auto exit when an error occurs

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-11 10:16:38 +08:00
Wu Zhou c12f3adee0 config-tools: ivshmem.vm_name changes with name edit
This patch is to fix the issue that when user edits VM name, the VM_NAME
field in IVSHMEM data doesn't sync.

To fix this, configForm emits a 'vmNameChange' when VM name is edited.
Then old name is replaced with new name. And when deleting VM, the old
name is replaced with null.

Tracked-On: #7445

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-11 09:47:29 +08:00
Wu Zhou c4f9146746 config-tools: limit the tooltip box max-width
The tooltip box's default width is inconsistent with the screen width.
It could run off the configurator window when the tooltip text is long.
Limit it to 50%.

Tracked-On: #7442

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-10 17:55:32 +08:00
Weiyi Feng d6a69970c6 config_tools: update node-fetch version lock to 2.6.7
update node-fetch version lock to 2.6.7

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-10 13:21:50 +08:00
Helmut Buchsbaum f5c63dd5ff doc: Adapt documentation to change of acrnlog log path
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 549d9004e9 acrn_log: Fix log path to comply with Linux FSSTD
Change logging path to /var/log/acrnlog to be compliant with the Linux
FSSTD, see https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html.

Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum a22d0497d7 life_mngr: Makefile: Fix permission of life_mngr.conf
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum bea9c8d165 life_mngr: Makefile: Fix install path creation of CONF_DIR
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum 5dbf09daef life_mngr: Makefile: Use sysconfdir
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Helmut Buchsbaum d3d0cba778 board-inspector: Fix sys.path for all internal modules
Tracked-On: #6688
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-05-10 09:20:14 +08:00
Junjie Mao ae2a78eb0e config_tools: drop version constraints on elementpath and xmlschema
After commit f8f1689a8 ("config_tools: do not apply distinct-values on a
union of node-set"), it has been confirmed that the reported build issue no
longer exists when using the latest elementpath (2.5.0) and
xmlschema (1.10.0). So this patch removes the version constraints in
requirements.txt.

Tracked-On: #7372
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-05-09 17:46:59 +08:00
Yifan Liu a12edaaab2 misc: configurator: Disable steps until prior step completed
Step 2 should be available after board is imported/created, and step
3 should follow step 2.

Tracked-On: #7435
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-09 11:25:11 +08:00
Weiyi Feng 5172bbf760 config_tools: fix can't find deb in build stage issue
fix can't find deb in build stage issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-09 09:56:01 +08:00
Kunhui-Li 8d78136ffb config_tools: add logic for virtio_framework in launch script
If the user select "Kernel based (Virtual Host)" in virtio_framework
entry, the "vhost" string will be added to the dm parameter.
The generated launch script will look like below:
"virtio-net tap=WaaG,vhost,mac_seed=${mac:0:17}-POST_STD_VM1"

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-09 09:26:16 +08:00
Kunhui-Li cceb169347 config_tools: update the text format of backend_device_file
Currently, the “backend_device_file” entry is a text combination of the
elements `//device-classes/inputs/input/name` and `//device-classes/inputs/input/phys`.
The format <name>:<phys> is shown in UI and the generated launch scripts.

However, we find ":" in some device physical path in adl-s-crb platform,
this will result in script can't correctly distinguish <name> and <phys> by a colon.
And we are not sure if colon will be found in the name variable in the future.

So this patch updates the text format of backend_device_file to
"Device name: xxx, Device physical path: xxx"
And the new text format will be shown in the UI and the generated launch script.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-05-09 09:26:16 +08:00
Weiyi-Feng 06b942f5eb config_tools: Add vue-json-schema-form and advanced custom component for IVSHMEM field
1. add Vue devtools support
2. update project dependencies
3. refactor configurator source code tree for private library hook
4. fix build issue
5. dynamic load scenario JSON schema(fix cache issue)
6. add vjsf 1.12.2 (latest) for private package dependencies
7. remove vjsf unnecessary files
8. use private vjsf as configurator dependencies
9. Add custom IVSHMEM_REGION widget
10. add a script to populate default values
11. get default values before export scenario xml
12. specify widgets in XML schema
13. add missing vjsf license file
14. populate default values to empty nodes
15. when user clicks save button, update formData with each field default value
16. fix when the user clicks the save button will collapse configFom
17. add success message for saving scenario XML

vue-json-schema-form 1.12.2 (latest)link: b30ea7c2d6/packages/lib

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-05-08 15:52:28 +08:00
Calvin Zhang e36b615fe1 misc: configurator: Config usb mediator devices in dropdown list
Support detecting connected usb devices in board_inspector and list them
in the usb mediator configuration menu.

Tracked-On: #7424
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-07 17:37:03 +08:00
Conghui 2d66ba4d40 config-tools: add warning message
Add warning message when users select a new board for an existing
configuration.

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui 292978aff1 config-tools: bugfix for deleting Service VM
When deleting Service VM, Post-launched VMs also need to be deleted.

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui ab51dcdab4 config-tools: show confirm info for deleting VMs
Show different confirm windows for Service_VM and other VMs.

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui 02c8043ff9 config-tools: change tab color
change tab color

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Conghui 5a3b38f778 config-tools: add confirm message
Add confirm message when saveing scenario and launch scripts.

Tracked-On: #7413

Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-07 15:31:35 +08:00
Yifan Liu 33c506427e misc: configurator: Bugfix: misplaced enum property
During conversion from xml to scenario.json, elements with "maxOccurs"
property is processed as json array, and (most) properties of that elements
goes to the json array. However the "enum" property should belong to the
array item, not the array itself.

Tracked-On: #7421
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-07 13:12:40 +08:00
Yifan Liu bf656a1141 misc: configurator: Bugfix: Incorrect DynamicEnum type
Currently dynamicEnum hook returns all available options (enums) as a
list of strings. However in some cases strings need to be converted to
target types.

One example is CPU affinity. The dynamicEnum should produce a list of
all available pCPUIDs (a list of integers), instead of a list of
strings.

This patch adds a converter in get_enum to do the type conversion.

Tracked-On: #7420
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-07 13:12:40 +08:00
Yifan Liu 35dc60192f misc: configurator: Re-assign VMID based on load order
Previously if user creates a shared scenario and adds a pre-launched VM,
the pre-launched VM will be assigned a VMID that's greater than service
VM, which will be blocked by scenario validation.

This patch re-assigns the VMID before saving as scenario XMLs based on
their load order. The UI-only VM name will have no impact on VMID that's
actually written to scenario XML.

Tracked-On: #7419
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-07 13:12:40 +08:00
Yifan Liu ee3a527464 misc: configurator: Open folder callback bugfix
Open folder callback should append a path split after selecting working
folder, same way as it did with default one.

Tracked-On: #7418
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-05-07 13:12:40 +08:00
Ziheng Li 8bdbedd6cf config-tools:Board Inspector Behaviors Improvement
1.Temporarily store the log in the form of tempfile,
and the temporary file will be deleted after the summary log information is displayed.
2.Now, the logs will be printed when they generated as well.

Tracked-On: #6689
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-05-07 11:25:44 +08:00
Kunhui-Li 019ae24c94 config_tools: update the hugepage algorithm
update the hugepages algorithm as the following steps.
1. calculate the total hugepages of service vm using the formula.
   "total memory - the memory consumed by pre-launched VMs - 3G
   -1G(memory need by service vm supporting virtio gpu)
   -300M*num(number of virtio gpu instance)"
2. calculate hugepage 2M/1G based post-launched vm memory setting.
3. correct the 2M/1G hugepages with the total hugepages in step 1.
   "correct_mb, correct_gb= math.modf(total hugepages - the memory
    consumed by Post_launched vm)
    hugepages_1gb = hugepages_1gb + correct_gb
    hugepages_2mb = hugepages_2mb + math.ceil(correct_mb*1024/2)"

Tracked-On: #7301
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-07 10:51:10 +08:00
jackwhich 9aa373aa3a config-tools: Update board.xml file based on board inspector modification
Update board.xml file according to board inspector modification
for removing nowait parameter in cmdline by commit: 4b81a2d89

Tracked-On: #7371
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-05-07 09:45:51 +08:00
Calvin Zhang 257b04f9ce misc: deb: Fix the ServiceVM kernel line in ACRN grub entry
After replacing partitioned ACRN deb with shared deb, the stale
multiboot module for ACPI1.bin was left in ACRN grub entry because it
was taken as kernel image.

Tracked-On: #7400
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-07 09:11:23 +08:00
Zhou, Wu 1f20d5e7a0 config-tools: board_inspector deb appends kernel CMDLINE
Currently installing board_inspector deb would overwrite the grub
default kernel CMDLINE GRUB_CMDLINE_LINUX_DEFAULT. This could lose
some useful kernel args configured by user.

This patch is to change the 'overwrite' operation to 'append'.

Simply appending new CMDLINE to GRUB_CMDLINE_LINUX_DEFAULT could
not work. We need to remove duplicated args, and keep the args in
its origin order.

Tracked-On: #7402

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-06 15:08:33 +08:00
Conghui 9669cc1c58 config-tools: add alert for non-exist file
Add alert when importing an non-exist scenario file

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-06 13:39:27 +08:00
hangliu1 1540d3479f config tool:add vmname in launch script
add vmname in generated launched script by a comment

Tracked-On: #7410
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-06 09:09:25 +08:00