Commit Graph

7505 Commits

Author SHA1 Message Date
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
Sun Peng 8e263385c5 dm: vdisplay: add modes supported by Windows virtio-gpu driver
Add 1280x1024@75, 1024x768@75, 1600x1200@60, 1600x900@60 modes.

Tracked-On: #7507
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-05-23 13:18:43 +08:00
Sun Peng a4b08b7694 dm: vdisplay: Remove 1280x720 resolution
1280x720 resolution will crash IDD of windows guest. To simplise, just
remove this mode.

Tracked-On: #7507
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-05-23 13:18:43 +08:00
Sun Peng f24f10b4b9 dm: vdisplay: Remove modes filter in EDID generation
All the modes that vdisplay supported should be reported to driver,
then driver should select the modes which report to OS.

Tracked-On: #7507
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-05-23 13:18:43 +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
Fei Li df3390f401 hv: vtd: reset the one-shot bits for GCMD_REG
If multiple control fields in GCMD_REG register need to be modified, software
must serialize the modifications through multiple writes to this register.

So one-shot bits (bits 30-29, 27 and 24) in gcmd should not been set.
Otherwise, other control field may be written to GCMD_REG at the same time
with one-shot bit (Clearing one-shot bit has no effect, software sets this field
would set/update this control field used by hardware).

Tracked-On: #7381
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-05-20 09:30:25 +08:00
Chenli Wei 5f0588b5f8 hv: move the define of MAX_IR_ENTRIES to offline tool
There is an issue of calculate 2^n roundup of CONFIG_MAX_PT_IRQ_ENTRIES,
and the code style is very ugly when we use macro to fix it.

So this patch move MAX_IR_ENTRIES to offline tool which could do align
check and calculate it automatically.

Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
2022-05-20 09:08:47 +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
Yuanyuan Zhao 3062aa409f hv: fix build warning with gcc-11.2
dm/vrtc.c:565:33: error: 'current' may be used uninitialized in this
function.[-Werror=maybe-uninitialized]

Move the local variable definition into one code block to avoid warning.

Tracked-on: #7511
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-05-19 14:44:35 +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 c96fb1cb0a hv: move the MAX_VUART_NUM_PER_VM to offline tool
Current code limit the MAX vUART number to 8 which is not enough for
Service VM which should config S5 UART for each user VM.

We could count how many vUARTs we need by offline tool, so remove the
define of MAX_VUART_NUM_PER_VM to offline tool is a simple and accurate
way to allocate vUARTs.

Tracked-On: #8782
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-05-13 13:50:07 +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