Commit Graph

7835 Commits

Author SHA1 Message Date
Chenli Wei 5c5749c1ff misc: add assertion to check the BDF value
The BDF of user setting should skip the slot '00', '01', '02', '1f', all
these slots should select one of the 03~1e.

This patch add an assertion to check the above policy.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-09-14 17:55:44 +08:00
Sun Peng 7a13807abe dm: vga: remove all the assertion.
To avoid assertions in devicemodel, remove all the assert() in vga.c,
use print error message to check errors.

Tracked-On: #8125
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Huang, Yonghua <yonghua.huang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-09-13 15:47:28 +08:00
Chenli Wei 669ebd0fd7 misc: refine upgrade script
There is some issue when use upgrade to update some old xml version to
release_3.1, this patch modify the upgrade script to fix these issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-09-08 17:51:42 +08:00
Jian Jun Chen 73ffa7d6d2 misc: life_mngr: revise try_receive_message_by_uart
Revise try_receive_message_by_uart to read one char from uart one time.
With this implementation each char can be checked. This can be used to
address the following 2 problems:
1) nosie data: it is found that there is noise data in the uart from
   guest VM when guest startup.
2) split multiple commands

Tracked-On: #8111
Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com>
2022-09-05 15:23:25 +08:00
Chenli Wei d459990443 misc: add assertion to check the CDP Enable
The current code have not check whether all cache region has "Code and
Data Prioritization", it's an issue for some platform which have only
L2 or L3 "Code and Data Prioritization" capability.

This patch add assertion to check whether all L2, L3 cache could be set
CDP_ENABLE.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-09-05 10:42:36 +08:00
Junjie Mao 14fe92a82f config_tools: handle multiple xs:documentation properly
With multiple xs:documentation nodes under the same xs:annotation, xs2js
will convert the XML into a dict where the key `xs:documentation` maps to a
list rather than a string. This patch enhances the converter.py to handle
such case properly.

Tracked-On: #8098
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-09-02 18:25:53 +08:00
David B. Kinder ad960a7ca1 misc: restore HIDDEN_PDEV_REGION and type
Restore a hidden option and its type accidentally removed by PR #8100 and #8099

Tracked-On: #8098

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-09-02 09:14:50 +08:00
Junjie Mao efa8fbf7d7 config_tools: fix a typo in cache info extractor
Commit 2a8b80d0c ("config_tools: board_inspector: guess L3 CAT parameters
if not reported via CPUID") refactors the implementation of `--add-llc-cat`
option of the board inspector but does not update the referenced XML nodes
properly. This patch fixes a using-undefined-variable issue introduced by
that commit.

Tracked-On: #7948
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-09-01 14:55:10 +08:00
zihengL1 842573c17a config-tools: generate config_summary.rst
Generate config_summary.py script in misc/config-tools/scenario_config
directory. This script can extract important information from scenario
and board xml to summary it into RST format text.

Tracked-On: #8063
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: zihengL1 <ziheng.li@intel.com>
2022-09-01 12:49:53 +08:00
David B. Kinder 1c2209451d doc: remove use of :ref: in tooltips
The configurator build requires the released documentation to be
published before it normally would so it can resolve :ref: links in
tooltips. Move these :ref: links into a second xs:documentation tag so
the reference will appear in the option documentation but not in the
tooltip (and break this premature dependency in the configurator build).

Tracked-On: #8098

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-09-01 08:18:32 +08:00
Chenli Wei f34cc21030 misc: add config for P2SB
Currently we have to use additional patch to change config tool python
code to enable P2SB hidden device.

This patch have add an element, user could config the P2SB device in
the scenario XML.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-31 10:14:13 +08:00
Chuang Ke bcea2a0c30 config_tools: enable RDT and CDP after launch scenario
Before, the logic automatically sets RDT as y if CDP is y. when the user imports a scenario, the CDP is y and RDT is y, the view will set CDP as y and RDT as y.
After fixing, the logic won't set RDT as y if CDP is y, which means the RDT won't be changed no matter if CDP is y or n(only when import scenario) .

Tracked-On: #8087
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-30 20:36:41 +08:00
Chenli Wei b09f617d85 misc: refine the vCPU sort for cpu_affinity and CAT
The current code sort cpu list by string order, this is an issue when
we want to assign more then 10 vCPUs for some VM.

So this patch rewrite the sort of these list, now the cpu list order
by int type.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-30 17:00:48 +08:00
Zhang Wei 9f89008c6e config_tool: modify the launchscript template
Change ">>/dev/stderr" to ">&2"
Although it seems that the two have the same effects, the way they work is different.
The ">/dev/stderr" does an open(), it goes to the filesystem look for that file, opens and write to it. The second way, ">&2",just uses file descriptor 2.
The acrnd deamon outputs the stdin and stderr messages to journal through socket. And the socket cannot be manipulated with open methods.So acrnd cannot open the "/dev/stderr" which has redirected to a socket.
For successfully excuting the create_tap function in acrnd deamon, We change ">> /dev/stderr" to ">&2".
For the remain ">> /dev/stderr", they all follow the echo command and will not harm the launchscript functionality.

Tracked-On: #8066

Signed-off-by: Zhang Wei wei6.zhang@intel.com

Signed-off-by: Zhang Wei <wei6.zhang@intel.com>
2022-08-30 10:53:28 +08:00
Chenli Wei a392335323 misc: update elementpath to 2.5.0
The current elementpath of ACRN Configurator use 2.4.0 which can's
support some new python interface, this patch update it to 2.5.0 to
fix the above issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-29 16:33:52 +08:00
Yuanyuan Zhao 58f8117c29 config_tools: UC_LOCK_DETECTION_ENABLED default value
Disable UC lock detection(UC_LOCK_DETECTION_ENABLED) by default.

Tracked-On: #8018
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-08-29 11:06:09 +08:00
Yonghua Huang 541f3916c8 dm: fix SSRAM region unmap failure issue
In ACRN HSM driver, only MMIO type is supported
 when doing EPT unmap.

 This patch walk around above issue to unmap
 SSRAM region before doing EPT mapping.

Tracked-On: #7563
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2022-08-29 09:32:53 +08:00
Chuang Ke c084a24ea2 [config_tool] Imported scenarios not populating CAT widget
fix CAT widget data doesn't refresh after import another scenario

the focus will go to "Basic Parameters" tab after import a scenario everytime. so that data could be refresh.

Tracked-On: #8068
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
2022-08-26 22:59:59 +08:00
zihengL1 5fee2b1f71 config-tools: add progress bar and timeout mechanism for board_inspector
Added progress bar for board_inspector.py in all extractors and
some detailed step.
Added timeout mechanism for update-pciids command.

Tracked-On: #7973
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-08-26 20:17:56 +08:00
Junjie Mao 9939f2e353 config_tools/upgrader: keep cache allocation policies properly
The current generic data moving policy in the upgrader do not work well
with complex nodes having multiple-occurred descendants. That causes the
lost of cache allocation policies in scenario XMLs when upgrading a v3.0
scenario XML to the coming v3.1.

This patch adds another generic-purpose mover that simply copies a whole
subtree unchanged.

Most nodes of this kind are handled by special movers as their formats
changed dramatically in v3.0, which is why that issue is not identified
earlier.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-26 19:15:36 +08:00
Chenli Wei 4ce7a9f43d misc: add assert to check the total memory size of User VMs
The current code does not detect the memory applied by all VMs, if it
exceeds the native memory, there will be an allocate failed and these
VMs can't run.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao junjie.mao@intel.com
2022-08-26 15:26:32 +08:00
zihengL1 59eb4f2963 config-tools: modified requirements.txt and update GSG
Modified misc/config_tools/configurator/requirements.txt
and misc/config_tools/requirements.txt. Updated getting-started.rst
and acrn_configurator_tool.rst.

Tracked-On: #7975
Signed-off-by: zihengL1 <ziheng.li@intel.com>
2022-08-26 13:12:14 +08:00
Yuanyuan Zhao 36dce72414 config_tools: update the comment of cpu_affintiy in launch_script
The parameter for cpu_affinity is apicid of processor now.
Update the comment.

Tracked-On: #8050
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-26 12:01:12 +08:00
Yuanyuan Zhao 5600f65710 config_tools: Add core type infomation to pCPU
If a platform has both P-core and E-core,
prompt user about the core type when set the CPU affinity for VMs.

Tracked-On: #8050
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-26 12:01:12 +08:00
Junjie Mao df68c7ad2e config_tools: support dynamic enum names in XML schema
The dynamic enum mechanism today only allows specifying the enum values
using XPATH. While this is sufficient from functionality point of view, it
may not provide the best experience as users have to understand the raw
data used internally. The typical way to present more informational labels
of enum values to users is enum names which cannot be supported by the
current XML schema to JSONSchema converter.

This patch allows the XML schema to specify dynamic enum names by adding an
`acrn:option-names` attribute to an element. The attribute is interpreted
as an XPATH which evaluates to a sequence of the same length of
`acrn-options`. The element at index i in that sequence is considered the
enum name of the enum value at index i of the results of `acrn:options`.

This mechanism is first applied to the `pcpu_id` element to indicate
whether a physical CPU is P-core or E-core.

Tracked-On: #8050
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-26 12:01:12 +08:00
Fei Li 9ebaa1cb69 life_mngr: permit life_mngr in windows to assign VM name
Permit life_mngr in windows to assign the VM name which configure
in scenario XML.

Tracked-On: #8051
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-08-26 11:43:18 +08:00
Chuang Ke d04d71e742 [config_tool] Configurator creates duplicate VM name
1.add condition to recalculate maxVMID from saved VM name,  so that vm name could be update correctly
if there is VM names "service VM" "real-time VM" "VM11", the new VM will be named "VM12"

2. support calculate VM name when changing any VM name.
if there is VM names "service VM" "real-time VM" , the new VM will be named "VM2",count from 0.

Tracked-On: #8046
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-26 10:41:29 +08:00
Yuanyuan Zhao 61fc0027a7 config_tools: change some default value
Change default user vm memory size from 256 to 1024.

Tracked-On: #8018
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-25 14:13:33 +08:00
Yuanyuan Zhao 4b3b41be11 config_tool: add MAX_PCI_BUS_NUM in UI
Add MAX_PCI_BUS_NUM in UI for user.
If user defined MAX_PCI_BUS_NUM is greater than the value
calculated by board.xml, use user defined MAX_PCI_BUS_NUM.

Tracked-On: #8018
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-25 14:13:33 +08:00
Liu Long ea596cd08c SampleApplicaton: Change schroot data mapping to desktop
1.Use desktop profie to repalce the default profile.
2.Change the flask images path as a absolute path.
3.Add the ssh config function to enable the ssh.

Tracked-On: #7820
Signed-off-by: Liu Long long.liu@linux.intel.com
2022-08-25 13:58:44 +08:00
Chuang Ke 0ac5ccd3f1 [Workshop] Configurator create scenario popup window disappear sometimes
fix: 1. popup window won't be close when user click  background
2.close popup window do cancel function related

Tracked-On: #7991
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-24 09:26:36 +08:00
Chenli Wei 93eb82c216 misc: refine the ACRN Configurator error message
The current ACRN Configurator show the XML name instead of DX-friendly
name when user delete the default value of some numeric field.

This patch add some "acrn:errormsg" which will show the DX-friendly name
to fix the above issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-24 07:39:26 +08:00
Chenli Wei 57001fcd45 misc: add assert to check the RTVM CPU affinity
The current ACRN Configurator have no warning when the user set CPU zero
to RTVM.

This patch add an assert to check the above.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-23 18:46:26 +08:00
Chuang Ke 1f7399d78e [config_tool] vUART widget address for pre-launched VM doesn't update
when the VM of a vUART endpoint changes the configurator can clear its corresponding I/O port or BDF settings automatically

Tracked-On: #8033
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-23 18:14:06 +08:00
Chenli Wei cbfe1fe61f misc: add cpu details to launch script
The current code use cpu_id in scenario xml and use apic_id of the pCPU
in the launched script, this confuses the user, especially the same name
"cpu_affinity" is used for these script.

So this patch add some comment to launched script to explain the
relationship between cpu_id and apic_id.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-23 16:10:10 +08:00
David B. Kinder e09e57e4ed Fix sample app histogram display release_3.1
Improve graph labels and align histogram bars on x-axis labels
Add n= value to show it's not a static image.

Tracked-On: #8025

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-21 15:15:13 +08:00
Chenli Wei 61f6ec6c88 SampleApplication: Update the image create scripts
Update the rc.local for User VM, check the echo result and try again
if the echo failed.

Tracked-On: #7820
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-18 10:25:35 +08:00
Liu Long d6a9d2315e SampleApplication: Add dhclient command
1.Add the dhclient for the VM images.
2.Disable the schroot data mapping.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-18 08:51:29 +08:00
Chuang Ke 3a1ce77e01 [config_tool] Real time vCPU checkbox is confusing to users
add tooltip to explain "Real-time vCPU"
use the one generated from the XSD files to generate tooltip infomation.

Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Tracked-On: #8000
2022-08-17 17:42:49 +08:00
Chuang Ke 2989f0fd2b [config_tool] v2 show warning message when users attempt to create a new scenario
fix warning message when users attempt to create a new scenario, or import an existing scenario, for an existing configuration
v1-->v2: update text to align with the design prototype spec.

Tracked-On: #7898
Signed-off-by: Chuang-Ke chuangx.ke@intel.com
Reviewed-by: Junjie Mao junjie.mao@intel.com
2022-08-17 17:06:39 +08:00
Liu Long 5ade5c2925 SampleApplication: Update the image create scripts
1. Delete the generated images if the create scripts failed.
2. Enable root user login on GUI.
3. Enable systemd service in case there are many error logs.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-17 15:52:43 +08:00
Chenli Wei edc934223e misc: add a uio init setting
We need set uio when the hmi and rt user VM setup, so creat a rc.local
in the '/etc' and run it after system setup.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-08-17 14:04:57 +08:00
David B. Kinder 9f0998af3e doc: remove use of :term: role in tooltip
The configurator can't process :term: glossary references, so remove it.

Tracked-On: #5692

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-17 10:51:26 +08:00
David B. Kinder b82805f77b doc: add tooltip for real-time vCPU option checkbox
Tracked-On: #9779

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-17 10:20:56 +08:00
chuangxke 206505453e Focus change to new VM when added
the focus  change to that new VM on the Basic tab when the new VM  added

Tracked-On: #7914
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-17 10:04:51 +08:00
Wu Zhou 8c5bb8b471 hv: change 'DISABLED' settings to 'ENABLED'
In order to improve DX, 'DISABLED' style configurator settings are
changed to 'ENABLED' style. The meaning of the MACROs are reversed,
so in the hv code we have to change '#ifndef' -> '#ifdef' or
'#ifdef' -> '#ifndef'.

Including:
  - MCE_ON_PSC_DISABLED -> MCE_ON_PSC_ENABLED
  - ENFORCE_TURNOFF_AC -> SPLIT_LOCK_DETECTION_ENABLED
  - ENFORCE_TURNOFF_GP -> UC_LOCK_DETECTION_ENABLED

Tracked-On: #7661
Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-08-17 09:23:33 +08:00
Wu Zhou c7b00e134f config-tools: change 'DISABLED' settings to 'ENABLED' in config xml
In order to improve DX, 'DISABLED' style configurator settings are
changed to 'ENABLED' style. The config xml files need too be changed
accordingly.

Including:
  - MCE_ON_PSC_DISABLED -> MCE_ON_PSC_ENABLED
  - ENFORCE_TURNOFF_AC -> SPLIT_LOCK_DETECTION_ENABLED
  - ENFORCE_TURNOFF_GP -> UC_LOCK_DETECTION_ENABLED

Tracked-On: #7661

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-08-17 09:23:33 +08:00
Wu Zhou 21d10af9d5 config-tools: change 'DISABLED' settings to 'ENABLED'
Some configurator settings are defined as 'feature DISABLED' style, which
could cause confusion to developers. This patch is to change them into
straightforward 'ENABLED' style.

Including:
  - MCE_ON_PSC_DISABLED -> MCE_ON_PSC_ENABLED
  - ENFORCE_TURNOFF_AC -> SPLIT_LOCK_DETECTION_ENABLED
  - ENFORCE_TURNOFF_GP -> UC_LOCK_DETECTION_ENABLED

Tracked-On: #7661

Signed-off-by: Wu Zhou <wu.zhou@intel.com>
2022-08-17 09:23:33 +08:00
David B. Kinder f2dacfa30c doc: update rdt doc with real-time vCPU option clarification
Improve explanation of the Real-time vCPU option checkbox.

[External_System_ID] ACRN-9307

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-16 14:28:06 -07:00
zihengL1 b026238a69 config-tools: modified requirements.txt and update GSG
Modified requirements.txt in misc/config_tools/configurator
directory and add GSG requirements.txt inmisc/config_tools
directory.
Relevant python package installing steps in GSG.

Tracked-On: #7975
Reviewed-by: Junjie Mao junjie.mao@intel.com
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-08-16 17:20:23 +08:00