Commit Graph

7763 Commits

Author SHA1 Message Date
Weiyi Feng 5172bbf760 config_tools: fix can't find deb in build stage issue
fix can't find deb in build stage issue

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

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

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

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

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

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

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

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

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

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

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

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

Tracked-On: #7413

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

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

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

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

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

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

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

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

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

Tracked-On: #7301
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-05-07 10:51:10 +08:00
Zhao Yakui 3921812885 ACRN:DM:VGPU: Add more standard modes for EDID block
EDID uses the bytes of 38-53 to support up to 8 standard modes. And it is
based on the mechanism: Byte 0 defines the xres / 8 - 31 and byte 1 defines
the aspect_ratio/refresh_rate.
But now it uses the incorrect logic in course of adding standard mode, which
causes that no standard mode is added in EDID block.

Fix it and add another two standard modes so that the guest_vm can parse
more modes from EDID.

Tracked-On: #7376

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-05-07 10:08:46 +08:00
Zhao Yakui 4972d29c2d ACRN:DM:VGPU: Fix the incorrect offset for EDID detailed_timing_block
The EDID uses the bytes of 54-125 to define the four detailed_timing_blocks.
But the static offset is used to update the DTB. This will cause that
the incorrect offset is used for DTB if the edid_generate is called several
times.

Tracked-On: #7376

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-05-07 10:08:46 +08:00
jackwhich 9aa373aa3a config-tools: Update board.xml file based on board inspector modification
Update board.xml file according to board inspector modification
for removing nowait parameter in cmdline by commit: 4b81a2d89

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

Tracked-On: #7400
Signed-off-by: Calvin Zhang <calvinzhang.cool@gmail.com>
2022-05-07 09:11:23 +08:00
Reyes, Amy c16ee09727 doc: Remove acrn quick setup script
- This script is outdated. The last time it was used was v2.0.

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-05-06 16:08:08 -07:00
Reyes, Amy 049a01c638 doc: Remove outdated ClearLinux Docker file
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-05-06 16:07:01 -07:00
Reyes, Amy c925d63dd9 doc: Copyedit upgrading_configuration.rst
- Grammatical and formatting cleanup

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-05-06 15:24:37 -07:00
Chenli Wei 288c6853f4 doc: fix the make configurator fails issue
The current code need python3.8-venv to build some modules, so we
should add these requirement to "Getting Started Guide".

This patch modify the getting-started.rst to generate new guide.

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-06 11:41:47 -07:00
Zhou, Wu 1f20d5e7a0 config-tools: board_inspector deb appends kernel CMDLINE
Currently installing board_inspector deb would overwrite the grub
default kernel CMDLINE GRUB_CMDLINE_LINUX_DEFAULT. This could lose
some useful kernel args configured by user.

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

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

Tracked-On: #7402

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-05-06 15:08:33 +08:00
Zhou, Wu 3ba5b1522f hv: fix post RTVM booting failure with SSRAM
When booting prelaunch RTVM with SSRAM enabled, we need to delete the
SSRAM region that is used by prelaunch RTVM from Service VM EPT mapping.
If it is not used, or it is not fully used, the SSRAM or the rest SSRAM
should be in Service VM map.

But current code has a issue that it always deletes all SSRAM region
from Service VM EPT, even when no SSRAM is enabled for prelaunch RTVM.

This could cause the post RTVM with SSRAM boot failure, as DM checks and
removes SSRAM region from Service VM EPT during post RTVM setup.

Changing get_software_sram_size() to PRE_RTVM_SW_SRAM_MAX_SIZE could
solve the issue, as PRE_RTVM_SW_SRAM_MAX_SIZE is the SSRAM size that
prelaunch RTVM actually uses.

Tracked-On: #7401

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

Tracked-On: #7413
Signed-off-by: Conghui <conghui.chen@intel.com>
2022-05-06 13:39:27 +08:00
Jiang, Yanting 599894e571 Fix: write xmm registers correctly
The movdqu instruction moves unaligned double quadword (128 bit)
contained in XMM registers.

This patch uses pointers as input parameters of the function
write_xmm_0_2() to get 128-bit value from 64-bit array for each XMM
register.

Tracked-On: #7380
Reviewed-by: Fei Li <fei1.li@intel.com>
Signed-off-by: Jiang, Yanting <yanting.jiang@intel.com>
2022-05-06 10:29:33 +08:00
hangliu1 1540d3479f config tool:add vmname in launch script
add vmname in generated launched script by a comment

Tracked-On: #7410
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-06 09:09:25 +08:00
hangliu1 0c5f7b5985 config tool:add restriction for some parameters
add value restriction for memory size and max pt irq entry

Tracked-On: #7407
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-05 16:50:22 +08:00
hangliu1 fd76e342ef config tool: add schema check for cpu_affinity
cpu_affinity is required field for non-service vm,
add the check in case user misconfig it.

Tracked-On: #7405
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-05-05 15:51:59 +08:00
Chenli Wei 513eafd6f0 dm: optimize the sub parameter of "-s" compatibility
This patch checks the change of "-s" sub parameters, which was
obsoleted or moved and the print some warnings msg or show the new
format.

The following obsoleted parameters are covered:

-s ,pci-gvt
-s ,virtio-hdcp
-s ,npk
-s ,virtio-coreu
--mac_seed

Reviewed-by: VanCutsem Geoffroy <geoffroy.vancutsem@intel.com>
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-05 15:03:34 +08:00
David B. Kinder e491773f5e doc: remove obsolete (and orphaned) docs
We removed some documentation from the table of contents but left them
around in the published documentation.  All of these documents are
obsolete and haven't been updated since they were last validated on
earlier versions of ACRN.  (They all can still be referenced in the
older version archives if needed.)

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-03 15:16:46 -07:00
Reyes, Amy ca3251a47d doc: Update Configurator steps
- Add build steps
- Update steps per new UI

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-05-03 15:16:21 -07:00
David B. Kinder 69f8f6dcdc doc: fix malformed virtio gpu device description
xs:documentation content has an indented line that causes the reST
formatting of the generated content to be off (leading spaces on lines
are significant to reST formatting).

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-05-03 15:43:18 +08:00
Zhou, Wu 4b81a2d89a config-tools: remove 'nomwait' from board_inspector's requirement
This patch is about the bug that VMs can't idle.

ACRN enables VM's C-state by extracting host's C-state table.
The C-state table has two types of interfaces: system-IO and mwait. VMs
just need one of them. ACRN can support both.

Currently we are telling users to use the system-IO type. That is, by
adding 'nomwait intel_idle.max_cstate=0' to host Linux's CMD line when
using board_inspector. (The reaseon we were using system-IO is that
mwait was buggy on Apollo Lake.)

But recent tests show that system-IO is somehow buggy. Linux c-state
driver(no matter intel_cstate or acpi_cstate) fails to enter idle state
with system-IO. This can always be reproduced on native environments.
MPERF counters show CPU cores are not in real idle state as expected.

To enable C-state in VMs, we have to switch to mwait.
As ACRN has already supported both system-IO and mwait, we don't have
to modify any code. We just need to tell user to use mwait instead of
system-IO.
That is, don't add 'nomwait intel_idle.max_cstate=0' to host Linux's
CMD line when using board_inspector. Just add 'intel_idle.max_cstate=0'

Due to the Apollo Lake's mwait bug, 'nomwait' is still needed for
Apollo Lake as an exception.

Tracked-On: #7371

Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-04-30 17:06:23 +08:00
David B. Kinder 819a179247 doc: improvements to config option doc generation from schema
Reduce expression complexity when searching for applicable-vms and views
annotations and increase ancestor search distance.

Don't sort glossary options to more closely mimic order found in the
configurator.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-29 12:48:59 -07:00
lirui34 b7f50ef980 config_tools: Add virtio_device example for all the platforms
We should add virtio_devices network / block / console nodes
to the generic_board scenario xmls.
But now we found some of the hybrid / hybrid_rt even the shared xml
are missing virtio devices block nodes, or not user will generate
invalid launch scripts.

Tracked-On: #7392
Signed-off-by: lirui34 <ruix.li@intel.com>
2022-04-29 17:50:31 +08:00
Fei Li 79442cbc96 dm: acpi: refine CPU Definition Blocks name
For all Definition Blocks in ACPI Namespace, their name are a fixed 32 bits.
This patch refine CPU Definition Blocks name to support more than 10 CPUs
for a guest.

Tracked-On: #7387
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-04-29 16:53:16 +08:00
David B. Kinder 205e182ae2 doc: tweak option config doc processing for missing attributes
When an element in the schema does not have an acrn:applicable-vms or
acrn:views (as opposed to having the attribute with an empty value,
acrn:views="") we need to look up the ancestors to see if any of them
have an element with such an attribute defined.  If non of the ancestors
have that attribute defined, then the intrepretation is that the element
can be found for all VMs or for both basic and advanced tabs.

Tweak the xslt processing of the schema data to option config doc to
reflect these semantics.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-28 11:30:44 -07:00
David B. Kinder f71c7a8032 doc: use DX-friendly names in configuration option documentation
Change the generated config option documentation to use the DX-friendly
names defined for the configurator UI (instead of the XML element name
hierarchy previously used).

Options are grouped by the top-level section (aka complex type) they
belong to and then sorted alphabetically with these groups.

Use badges to indicate where options can be found in the configurator UI
and whether they're applicable to the Hypervisor or Pre/Post/Service VM.
Add a custom css style for the config-option doc that puts the first
paragraph of a glossary item on the same line as the glossary term so
these badges look pretty.

Added a acrn-custom.js patch that copies the alt text for images into a
title property for images within the config-doc document.  This provides
tooltip text when hovering over the badges.

Don't display options not visible in the configurator UI (elements with
acrn:views="").

A missing acrn:views or acrn:applicable-vm means we look for an
applicable value from an ancestor element.

Add processing of a second xs:documentation element within an
xs:annotation element. This second documentation element's content will
be appended as a new paragraph to the first xs:documentation content in
the generated documentation. Only the first xs:documentation element is
used by the Configurator for its tooltips.

Update documents that were referring to options by their XML names.

Because we're now using a glossary to provide links to config options,
we can't duplicate option names or glosary names anywhere in the doc
set.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-28 07:56:35 -07:00
Junjie Mao f8f1689a88 config_tools: do not apply distinct-values on a union of node-set
The latest version of the elementpath library (i.e. 2.5.0) fails to
evaluate an XPATH which feeds a union of node sets to the `distinct-values`
function. An exception will be raised in such case, which eventually causes
the hypervisor build to fail.

This patch removes the usage of `distinct-values` function in the
XPATH. This may cause some additional delays to the evaluation of the
assertion, but at least will not impact the build even the latest versions
of the Python libraries are used.

Tracked-On: #7372
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-04-28 15:36:11 +08:00
Chenli Wei 3b4841b91d misc: fix the issue of create hv node
There was an issue of create hv node by clos module, the direct cause
is the create logic and the indirect cause is these modules of
static_allocators was not sorted before run which cause some platform
have issue and CI could not found.

So this patch fix the create issue and sorted the modules list to make
sure all these platform could work well and get the same allocation.xml

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-04-28 13:42:54 +08:00
Ziheng Li 92c9252f4c [acrn-configuration tool] make scenario shared file error cp error
Fixed the error that the "'chmod +x ./build/acrn_release_deb/DEBIAN/preinst'"
command and "sed -i \'s/\r//\' ./build/acrn_release_deb/DEBIAN/preinst" command
are still executed when there is no "./build/acrn_release_deb/DEBIAN/preinst"
file after build.

Tracked-On: projectacrn#7383
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-04-28 10:10:55 +08:00
Zhao Yakui 373dac68ef ACRN:VGPU: Virtio_gpu_init calls the vdpy_init before vdpy_get_display_info
Now vdpy_get_display_info/get_edid is called before vdpy_init.
This is incorrect. They should be called after setting up the
connection with vdisplay.

Tracked-On: #7376
Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-28 09:41:06 +08:00
Zhao Yakui e3b7f736d7 ACRN:VGPU: Add the missing initialization of vdisplay info
Now some fileds are not initialized, which causes that ACRN-DM doesn't
handle the request of VIRTIO_GPU_CMD_GET_DISPLAY_INFO and
VIRTIO_GPU_CMD_GET_EDID.

Tracked-On: #7376
Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-28 09:41:06 +08:00
Zhao Yakui 402565f222 ACRN:VGPU: Fix the incorrect logic of fetching EDID
The virtio_gpu in guest_vm will try to fetch the EDID to query
the supported resolution. Guest vm will send the cmd of
VIRTIO_GPU_CMD_GET_EDID and receive the response of VIRTIO_GPU_RESP_OK_EDID.
Now acrn-dm has some issues in course of handlding EDID request: Incorrect
resp type, the incorrect response. This will cause that the guest_vm fails
to fetch the EDID.

Tracked-On: #7376
Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-28 09:41:06 +08:00
Weiyi-Feng c544ac98bc config_tools: fix document typo
fix document typo

Tracked-On: #6691
Signed-off-by: Weiyi Feng weiyix.feng@intel.com

Co-authored-by: David Kinder <david.b.kinder@intel.com>
2022-04-27 12:54:47 +08:00
Weiyi Feng f9cb5edc7e config_tools: update configurator document and build script
1. update configurator document.
2. fix build script doesn't generate allchecks.xsd issue.
3. add open_devtools command, now we can get detail debug info in prod.
4. remove vconsole component, which will cause some strange js runtime issue in Linux.

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-27 12:54:47 +08:00
Ziheng Li c9e982557b [acrn-deb] install_compile_package function is not consistent with gsg
Remove misc/packaging/install_uSoS.py,
because there's no use for this script.

Tracked-On: projectacrn#7370
Signed-off-by: Ziheng Li  <ziheng.li@intel.com>
2022-04-27 10:33:34 +08:00