Commit Graph

1384 Commits

Author SHA1 Message Date
Shiqing Gao 3eb1237db3 config_tools: verify "iasl" version against IASL_MIN_VER
To avoid hardcoding the minimum "iasl" version in multiple places, IASL_MIN_VER
is defined in the top-level Makefile and is passed to config_tools.

This patch verifies "iasl" version against IASL_MIN_VER directly in
config_tools.

Tracked-On: #7880

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2022-07-13 14:01:01 +08:00
Shiqing Gao 3f0fae81b2 config_tools: use ASL_COMPILER as the path to the "iasl" compiler
At build time (on the *dev* machine), config_tools depends on "iasl" to
generate the binary of ACPI tables for pre-launched VMs.

This patch does:
- pass ASL_COMPILER to config_tools
  By default, ASL_COMPILER is initialized by "which iasl" at build time.
  User could override it by specifying ASL_COMPILER as the build option,
  like below:
    make BOARD=xxxx SCENARIO=yyyy ASL_COMPILER=/usr/local/bin/iasl

- use ASL_COMPILER as the path to the "iasl" compiler in config_tools

v1 -> v2:
 - add a check to make sure ASL_COMPILER is initialized to a value

Tracked-On: #7880

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2022-07-13 14:01:01 +08:00
Ziheng Li 7cffac359b config-tools: refine memory allocation for pre-launch vm
Fixed a logic error in one line of code in
misc/config_tools/static_allocators/memory_allocator.py.

Tracked-On: #7838
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-07-13 11:29:39 +08:00
Geoffroy Van Cutsem 84ef1ec381 doc: add README.rst to misc/hv_prebuild
Add a basic README.rst to the misc/hv_prebuild folder to give a brief
explanation as to what is in there and to help users navigating to that folder
determine if they should care or not.

Tracked-On: #5580
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-07-12 17:33:49 +08:00
Yuanyuan Zhao d8761ed7f0 config_tools: hide required checkbox's & drop-down box label
Required fields with a checkbox or drop-down box will potentially
cause confusion. So hide the label when display them.

Tracked-On: #7864
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-07-11 17:48:23 +08:00
Weiyi Feng 8adf40293c config_tools: try to fix dirty form data
try to fix dirty form data

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-07-11 14:20:19 +08:00
Weiyi Feng 47337f55f5 config_tools: fix new working folder cancel button
fix new working folder cancel button

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-07-11 14:20:19 +08:00
Chenli Wei 7be26940f7 misc: refine the assert of duplicate IO port
The current code judges an empty vm_name as a normal vm_name and assert
two endpoints with null name use the same IO port.

There was another which check wether the vm_name of endpoint is null, so
this patch break the assert if get null vm_name.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-07-08 10:00:57 +08:00
Kunhui-Li aeab5a29ae config_tools: update loading msr driver logic
load msr driver if not found cpu number.

Tracked-On: #6689
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-07-07 16:50:20 +08:00
Geoffroy Van Cutsem ff07ccae0f Makefile: remove old samples (Apollo Lake)
Remove sample files and launch scripts related to the Apollo Lake (APL)
platform since ACRN no longer supports it. Clean the Makefile as well to not
install these files on the target system.

Tracked-On: #6175
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-07-05 10:08:40 +08:00
Geoffroy Van Cutsem 873ddbb969 Remove "All Rights Reserved" string from license header
One had escaped from the global cleaning that commit 8b16be918 did.

Tracked-On: #7254
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-07-04 16:17:05 +08:00
jackwhich 7d7c541615 config-tools: Fix release_3.0 vecow hybrid not working properly
Fix release_3.0 tgl-vecow-spc-7100-Corei7 hybrid not working properly

Tracked-On: #7371
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao fb3e3fcd3e config_tools: mark os_config item as required in scenario XML
Following the same logic of commit 59c7077e2 ("config_tools: remove
minOccurs from items that have default values"), this patch marks the
config item os_config, which is a collection of guest OS settings, as
required since subitems of it either have default values or are optional.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 35b8d53af3 config_tools: fix configForm character display issue
fix configForm character display issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Kunhui-Li b5b6503248 config_tools: add default value for virtio console
add default value for virtio console

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao 541e9304f6 config_tools: remove minOccurs from items that have default values
With the default population stage today, the `default` and `minOccurs=0`
attributes are typically mutually exclusive:

  * A config item with a `default` attribute is guaranteed to exist after
    populating default values, making the `minOccurs` attribute meaningless.

  * A config item with a `minOccurs=0` attribute allows that item not to be
    present even after default values are populated.

This patch removes the `minOccurs=0` attributes from some config items that have
their default values recently added. This allows the default value populator to
fill in those items as expected if a user does not provide them explicitly.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Geoffroy Van Cutsem c75965f1c8 acrn_config: update text when loading the Configurator
Update the text that shows up when loading the ACRN Configurator.

Tracked-On: #6690
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Co-authored-by: David Kinder <david.b.kinder@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng e3848feabf config_tools: disable cpu_affinity realtime vcpu column checkbox
disable cpu_affinity realtime vcpu column checkbox

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 92f5c67af6 config_tools: set CAT's standard vm RTCore to standard group
set CAT's standard vm RTCore to standard group

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 342e8c05f6 config_tools: refine cat widget
refine cat widget

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Kunhui-Li 9f7c4b6bab config_tools: add default value for some elements
1. add default value for some elements.
2. update shared.xml for generic_board.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 33086d5638 misc: fix PCI vUART issue
The current code can't config PCI vUART by a unified HV Config and there
is a conflict between the HV vUART Config and PCI vUART Config.

This patch use PCI vUART Config to replace the HV vUART Config when the
vUART connection type is PCI and modify the launch scenario to make sure
the BDF is correct when user launch post launched VMs.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao 40225337d2 config-tools: fix assertions against scenario XML
This patch fixes the following issues in the existing scenario schema
assertions:

  1. The assertion that ensures the existence of pCPU affinity in all
     pre- and post-launched VMs does not count the pCPU settings under a
     VM properly.

  2. The assertion that ensures the presence of CAT settings of a defined
     VM is no longer needed as it was originally designed to capture
     configurator issues.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei d43a141f85 misc: add assert to check the missing of CLOS MASK
The current UI there is an issue which have not sync and save the VMs
to RDT element, these issue will cause the missing of num_pclosids and
the HV can't start.

This patch add assert to check the the missing of CLOS MASK.
The UI issue will be fix by another patch.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 2efa77c86d misc: set the communication vUART default type to PCI
The current code use the legacy as the default type of communication
vUART, these were only 4 standard vUART ports, others should config by
the /etc/serial.conf, so this patch change the default type to PCI
which could be used without config files.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-06-29 13:53:42 +08:00
David B. Kinder dff6a31844 config: update error message when no serial console and debug build type
DX improvement to configurator UI error message

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao 5a01fa1a7a FIXME: packaging: generate a grub entry for shared scenario by default
The debian package created by misc/packaging today is supposed to add an
entry into grub.cfg for the installed hypervisor. Unfortunately, that is
done only when the given scenario XML is named shared, partitioned, hybrid
or hybrid_rt. In the rest of the cases, no entry is added while the default
boot option is still changed to ACRN_deb_multiboot2 which does not exist.

As a short-term workaround, this patch adjusts the branching structure of
the postinst script so that a grub entry is always generated. The entry for
shared scenario is chosen as the default if the scenario XML has a name
other than partitioned, hybrid or hybrid_rt.

This is a workaround only for release 3.0. In future releases we should
migrate to the dpkg-buildpackage using the scripts under debian/.

Tracked-On: #7778
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng b816a5ca09 config_tools: open scenario document in new window
open scenario document in new window

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng c99717d83d config_tools: hide severity from error message
hide severity from error message

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 52f4dcd0c6 config_tools: add document link for create scenario modal
add document link for create scenario modal

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng a5f95ce672 config_tools: hide syntactic error message from configurator ui
hide syntactic error message from configurator ui

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 44a6e99009 config_tools: add error icon for hypervisor tab
add error icon for hypervisor tab

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao 5141a13464 config_tools: clean up RDT-related assertions
The following issues are witnessed in the RDT assertions in XML schema
rdt_support.xsd:

  * Some assertions still check data in vcpu_clos nodes which no longer
    exist today because of the refinement of how RDT is configured.

  * For those that still hold, acrn:severity and acrn:report-on are not
    stated, which prevents the validation activity from reporting failures
    against them.

This patch drops the assertions that no longer make sense today and add
ACRN-specific attributes to those that still hold.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Kunhui-Li 80766124a9 config_tools: fix the issue Service VM type is updated by UI automatically
Currently, if I update Pre-Launched VM type to real-time, select PCPU ID and
enable Real-time vCPU, then we update the name of sevice VM, finally, click the save button.
we will see the type of service vm is updated to RTVM. It is unexpected.

So this patch removes the logic of hiding service VM type, and only allows user
selecting Standard VM type to fix the issue that the service vm type is updated
by UI automatically.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 08d3435ffe config_tools: update configurator readme windows cmd line path split
update configurator readme windows cmd line path split

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 8eb1bbda3f config_tools: add error icon in tabBox when validate failed
add error icon in tabBox when validate failed

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 89bfe20e2d config_tools: update configurator readme
update configurator readme

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Ziheng Li 3b5fbade33 config_tools: refine vm_type in upgrader
Rename "vm_type" from "SOS_VM" to "STANDARD_VM".

Tracked-On: #6690
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-06-29 13:53:42 +08:00
Fei Li ce34ca658e misc: life_mngr: generate system_reboot_trigger_win.py script when build life_mngr
generate system_reboot_trigger_win.py script when build life_mngr for Waag.

Tracked-On: #7215
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-06-29 13:53:42 +08:00
Fei Li 2c7fbecc89 misc: life_mngr: fix a bug about receiving message
On some extreme circumstances, the client can't send the whole message out
in a short time. In this case, the server can't receive the whole message
because now server didn't check the integrity of the message.

This patch add this by checking the terminal character of the message.

Tracked-On: #7215
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-06-29 13:53:42 +08:00
Kunhui-Li a39e38f71e config_tools: fix the issue that fail to import scenario
fix the typo in validateScenario.py because it leads to
fail to import scenario xml.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng fb84b519ab config_tools: fix UI cpu_affinity cpu_id validation logic
fix UI cpu_affinity cpu_id validation logic

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 78a87b613b config_tools: filter out non-existing history path
filter out non-existing history path

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 7965b66629 misc: modify the vUART index order and irq
There were some legacy logic of the current code, the PCI vUART index
in the launch script have not count the vUART of S5 and life_mngr_win
use the COM2 as default vUART.

This patch change the vUART index and irq to adapt above logic and all
of these legacy code will be refine next version.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-06-29 13:53:42 +08:00
Kunhui-Li ecfecd40a0 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*0.98 - the memory consumed by pre-launched VMs - 5G
-300M*num(number of virtio gpu instance)".
2. calculate hugepage 1G based post-launched vm memory setting.
3. check if the memory configured in post launch VMs is not larger than
the total hugepages.

Compared with the previous version, this patch removes the 2M hugepage
and the correction value, also update the formula of total hugepage.

Tracked-On: #7301
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao 256dd158c3 config_tools: fix a module resolving issue in elementpath overlay
The library module introduced by commit 2cd13026e ("misc: move the RDT
interface to common library") was put under the library/ directory which is
not by default searchable from elementpath_overlay. This patch works around
the issue by adding that path to sys.path.

Also fix a typo in the RDT checking assertion.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
David B. Kinder 30fd08b1a4 configurator: Remove duplicate vCPU assignment error message
Remove duplicate assertion and improve message text.

Tracked-On: #7745

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 72c406c2b7 misc: move the RDT interface to common library
The current RDT class and interface was define by the clos.py which is
mix get and merge RDT policy, create clos nodes.

Now we need call these interface to check the CLOS IDs number after
merged RDT policy, so this patch abstract the RDT interface to common
and add an assert to check the CLOS IDs number.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng 27525d0ae6 config_tools: add cpu_affinity error message
add cpu_affinity error message

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-06-29 13:53:42 +08:00
Weiyi Feng e25087c539 config_tools: add * in cpu_affinity widget first line of pcpu config
add * in cpu_affinity widget first line of pcpu config

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