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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>