Commit Graph

1384 Commits

Author SHA1 Message Date
Junjie Mao fbfa81a665 config_tools: conduct full validation on save
This patch makes the configurator validate both syntactically and
semantically the resulting scenario XML everytime users save their
configurations. This allows the validation to catch all errors and report
status properly.

While a full validation is conducted, the syntactic errors are not shown
at the top of the forms in the same way as the semantic ones. This is
because syntactic rules are already built into the JSON schema and
will be warned real-time under the corresponding widgets. There is
no need to duplicate such errors. At the same time, the messages of
syntactic errors are generated by xmlschema which may not look
friendly to end users who do not have knowledge about the internal
structures of scenario XMLs.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao 5fcb58a4b2 config_tools: relax the checks of scenario XMLs from users
Today we are using, in the configurator, the complete scenario XML
schema to validate XML files given by users. While this helps identify
invalid XMLs at an early stage, such checks are too strict because the
configurator users may save invalid XMLs if they keep some errors in
the forms unresolved, and we do allow them to save anytime they
want. As a result, users may save something that they cannot load
back anymore.

This patch introduces a tailored version of the scenario XML schema
which only verifies the existence of the top-level nodes that the
configurator assumes to exist. This seems to be a good balance that
blocks XMLs that are broken or using old formats but permits those
that has local and fixable data issues.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
David B. Kinder 6b6f961088 Improve description and title for vUART connection end point VM name
Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 753b2cf2c3 Revert "config_tools: add SyntacticValidationStage before save scenario"
This reverts commit 68636087a6.

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Ziheng Li c24515cb7c config_tools: refine some issues in upgrader
1.refine IVSHMEM_REGION node. Now if "IVSHMEM_REGION" node is empty,
the method "add_ivshmem_region" won't show an error.
2.refine vm_type node. Add try expect into method "move_vm_type", and
now if there is no "vm_type" node, the .pop() operation won't lead
to an IndexError.
3.refine move_memory method. Add handling process of "size" node,
if it's text is a hex number.

Tracked-On: #6690
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-06-29 13:53:42 +08:00
Ziheng Li 91f52b3b62 config-tools:refine memory allocation for vm
1.The memory allocation effect is tested under XML files on multiple platforms.
2.Modified the conversion of memory units during memory reading and processing (MB to Byte).

Tracked-On: #7730
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng a60b774c61 config_tools: add SyntacticValidationStage before save scenario
add SyntacticValidationStage before save scenario

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Ziheng Li 05fd75eeda config_tools: refine issues in the upgrader
When run the upgrader.py to merge scenario XML and launch XML files,
deleted "desc" text in "usb_xhci" node, and added the "vbootloader"
text from "Enable" to "y", from "Disable" to "n".

Tracked-On: #7660
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-06-29 13:53:42 +08:00
Yuanyuan Zhao 4bb19ace20 config_tools: add default value to 'vm_type'
Set 'STANDARD_VM' as default value for 'vm_type'.

Tracked-On: #7726
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-06-29 13:53:42 +08:00
David B. Kinder 2f03a7525f doc: update VM types description to use DX-friendly title
Missed a use of the XML element name instead of the DX-friendly title in
the option description.  (For those paying attention, the default value
shown in the description also uses the XML element name, but we don't
have a convenient way to turn that string into the corresponding
acrn:title value.

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 4c56fa8ddb misc: modify the HV start address
The current code use a start address and hv_ram_size to find the start
address of acrn.bin, the start address is 32M which leaving too much
memory and will be load modules by grub, sometimes these modules will
override the HV log region.

This patch set the start address to 4M to avoid the above issue as much
as possible.

This algorithm depend on the board info, so the board XML should be
generate again if user change the SSRAM.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 7c80bfd86d config_tools: remove ivshmem region id from ui
remove ivshmem region id from ui.

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
hangliu1 cfd677c782 config tool: change vm_type to required field
hide vm_type in UI for service vm, and change it to
required field, since lack of it in xml may lead to
wrong inference for vm severity.

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-06-29 13:53:42 +08:00
Zhao ea8651cbd6 config_tools: support add vm_type for a new Service VM
For vm_type is a required property, support set vm_type to a new added
Service VM.

Signed-off-by: Zhao <yuanyuan.zhao@intel.com>
2022-06-29 13:53:42 +08:00
Yifan Liu c32b182958 misc: configurator: fix minor bug of IVSHMEM region name
IVSHMEM region name input value may be null after saving the scenario.
Add a null check to avoid marking empty input as correct.

Tracked-On: #7707
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei ddefcccb26 misc: add processing for Console vUART is None
The current code assume there was one Console vUART all the time, and
there is an issue when the Console vUART is None.

This patch add the case of "None" and add assert to check no serial
console config.

Tracked-On: #6690
Signed-off-by: Chenli Wei chenli.wei@intel.com
2022-06-29 13:53:42 +08:00
Qiang Zhang 181ab6afea misc: configurator: Switch to basic form after switching VM or HV tabs
Switch to basic form after switching VM or HV tabs to make the basic
form default view.

Tracked-On: #7712
Signed-off-by: Qiang Zhang <qiang4.zhang@intel.com>
2022-06-29 13:53:42 +08:00
Ziheng Li d5c36632f1 config_tools: refine issues in the upgrader
Now in scenario XML file:
1.The vm memory node info has been transformed into a new form(
e.g. hpa_region, start_hpa, size_hpa, and size).
2.The clos node info will be dropped during the upgrade process,
and users can see the discard waring info.
3.During the upgrade process, the node "RELOC" will be renamed
to "RELOC_ENABLED", the node "MULTIBOOT2" will be renamed to
"MULTIBOOT2_ENABLED".

Tracked-On: #7660
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-06-29 13:53:42 +08:00
Yifan Liu e549f73f8e misc: configurator: Apply pattern check to IVSHMEM name
This patch applies pattern check to IVSHMEM name. Report error if regex
does not match.

Tracked-On: #7707
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-06-29 13:53:42 +08:00
Yifan Liu 1f4ac22bb1 misc: Limit IVSHMEM region name to 27 characters
Current IVSHMEM region name does not have size limit. This patch limits
it to 27 characters so that land specifier ("hv:/" or "dm:/") plus region
name can fit into an array of 32 characters.

Also change some descriptive messages.

Tracked-On: #7707
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-06-29 13:53:42 +08:00
David B. Kinder f11d00c549 doc: edit RDT_ENABLED tooltip
Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 747b32ef5d misc: modify the logic of generate HV_RAM_START
The current code assume that there must be an HV_RAM_START element in
the scenario and we will generate it if user have not set, the default
value of HV_RAM_START is 0x00400000 which cause an overlap issue.

This patch remove the requires of HV_RAM_START element, calculate
HV_RAM_SIZE and find a region of e820 to run the ACRN which start
address will be HV_RAM_START.

It is still valid if the user set HV_RAM_START by XMLs.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-06-29 13:53:42 +08:00
Yuanyuan Zhao 112599c70d config_tools: clear schema files
Clear schema files of config tools when 'make clean'.

Tracked-On: #7508
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 210cd9c12c config_tools: CAT is no longer unchecked when VCAT is unchecked
CAT is no longer unchecked when VCAT is unchecked

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
hangliu1 0813247eb0 config tool:add schema check for UI name validation
ivshmem name and vuart connection vm name are required in UI, so
add the check in case user miss setting them.

Tracked-On: #7700
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-06-29 13:53:42 +08:00
David B. Kinder 54e275c8bb doc: edit schema assert messages for clarity and grammar
Use DX names (acrn:title) instead of element names in messages.
Add missing message in rdt_support.xsd (all asserts need an annotation
with documentation for the error message that will be reported).

Tracked-On: #7685

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei ecaecaf904 misc: fix the conflict between S5 and LPC
The current code use COM1 or COM2 for LPC and there is an conflict with
S5 feature.

This patch filter these COM Ports and 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 d93b773755 config_tools: delete the old board file when the new board file is imported successfully.
delete the old board file when the new board file is imported successfully.

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng f5d3d71526 config_tools: disallowed user set CAT CLOS_MASK to 0
disallowed user set CAT CLOS_MASK to 0

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng d7c7808fc2 config_tools: CAT is no longer unchecked when CDP is unchecked
CAT is no longer unchecked when CDP is unchecked

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 92bc8034be config_tools: fix vmNameChange event never called issue
fix vmNameChange event never called issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Conghui 12b6faf375 config-tools: fix vBDF issue for IVSHMEM
1. Fix the issue that when saving the configuration, the vBDF does not
display automatically in IVSHMEM region.
2. Chagne 'Region name' in IVSHMEM from optional to required.
3. Fix the wrong tooltip content for 'VM name'.

Tracked-On: #7673
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-06-29 13:53:42 +08:00
Qiang Zhang e1df1ea820 misc: config_tool: allow cpu sharing among standard VMs
CPU sharing among standard Pre-launched VMs and Post-launched VMs are
allowed by design. Revert 4e2abfb473 ('misc: configurator: add check
for uniqueness of cpus in Pre-launched VM')

Tracked-On: #7688
Signed-off-by: Qiang Zhang <qiang4.zhang@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 3ce7e86313 config_tools: update CAT data when board updated
update CAT data when board updated

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 9af79bd80d config_tools: fix delete vm failed issue
fix delete vm failed issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng fb91ad9a1a config_tools: reformat Board.vue
reformat Board.vue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 8ac076a540 config_tools: show confirm message when user deselecting checkbox in cat widget
show confirm message when user deselecting checkbox in cat widget

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 21240fd84e config_tools: fix when CAT checkbox data missing, ui will hang up in hv.advanced issue
fix when CAT checkbox data missing, ui will hang up in hv.advanced issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 34ce6743de misc: add assert to check ivsh memory region name
The current code allow the same region name for same VM, it's an issue

This patch add an assert to check the above issue and report it.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-06-29 13:53:42 +08:00
Conghui 13da29b589 config-tools: tiny fix for tooltip
use v-html to display the HTML.

Tracked-On: #7639
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-06-29 13:53:42 +08:00
Ziheng Li de32ace0c6 board_inspector: refine board_inspector.py
Changed default log level into "warning",
and fixed errors in warning log summary.
And further modified the log summary of checking
each message category.

Tracked-On: #7653
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-06-29 13:53:42 +08:00
hangliu1 b2a04fc23a config tool: refine cpu_affinity
remove default setting and refine statement.

Tracked-On: #7674
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-06-29 13:53:42 +08:00
Zhao 145129cad0 config_tools: schema of 'VM_NAME' for 'IVSHMEMVM'
Set VM_NAME' for 'IVSHMEMVM' as required property in schema.

Tracked-On: #7662
Signed-off-by: Zhao <yuanyuan.zhao@intel.com>
2022-06-29 13:53:42 +08:00
Qiang Zhang 1d7d2f06a9 misc: config_tools: fix make deadloop on release build with debug scenario
When I build a release acrn with a debug scenario like this:
$ BOARD=nuc11tnbi5 SCENARIO=shared make -j1 RELEASE=y

Following logs are repeated endlessly.

/home/abc/workspace/mainline/acrn-hypervisor/build/hypervisor/configs/allocation.xml generated
/home/abc/workspace/mainline/acrn-hypervisor/build/hypervisor/configs/unified.xml generated
/home/abc/workspace/mainline/acrn-hypervisor/build/hypervisor/configs/config.mk generated
scripts/makefile/config.mk:191: The command line sets RELEASE to be 'y', but an existing build is configured with 'n'
scripts/makefile/config.mk:191: The configuration will be modified for RELEASE=y

Because "BUILD_TYPE" was moved out of "DEBUG_OPTIONS" in scenario file,
outdated transform script fails to extract information there and it always
set 'CONFIG_RELEASE=n'.

If a makefile is included with a rule for it, the rule will be executed
first to generated new makefile. If it's updated, the make process will
be reexecuted with new makefile.

In the case above, build/hypervisor/configs/config.mk rule is executed every
time make tries to include it. Unhandled different between `RELEASE` and
`CONFIG_RELEASE` causes determine_build_type to update .scenario.xml which
is a dependency of hypervisor/scripts/makefile/config.mk.

Tracked-On: #7657
Signed-off-by: Qiang Zhang <qiang4.zhang@intel.com>
2022-06-29 13:53:42 +08:00
Wu Zhou 15753e5e63 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-06-29 13:53:42 +08:00
Ziheng Li 7c17700dfb board_inspector:refine board_inspector.py
Completed the five log level information in help output list.

Tracked-On: #7654
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-06-29 13:53:42 +08:00
Yifan Liu 491a5517cb misc: configurator: fix IVSHMEM size missing bug
Fix IVSHMEM size selection options missing bug due to data provider
being deleted by mistake.

Tracked-On: #7650
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 953bf698ac config_tools: add notice message for RDT checkbox
add notice message for RDT checkbox

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
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