Commit Graph

215 Commits

Author SHA1 Message Date
dongpingx 4924766b67 misc: fix openssl's vulnerability for tauri
Trivy scaned one vulnerability three days ago and we fixed it now.

The title for vulnerability is openssl's `MemBio:get_buf` has undefined
behavior with empty buffers.

I tested through building configurator, launching it and generating
scenario.xml & launch scripts. I confirmed the result is correct.

Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8668
2024-07-30 10:06:31 +08:00
dongpingx 56108c0a1f misc: Configurator Main VM Support
This patch is to support Main VM, i.e., the Main VM scenario is similar to
paritioned scenario, which select one VM as Main VM and owns the
physical resources.

I extracted all pcis from the board, substracted them with dispatched ones
and then make an assignment to replace the old enums.

This is implemented through two methods called updateSchema which is
to update schema on the current VM and updateLoadSchema which is
to maintain pcis, i.e. removed the pcis listed on the pre-launched VM,
while loading scenario.xml.

I tested locally and confirmed the functionalties above are implemented.

Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8657
2024-07-18 10:41:48 +08:00
Haiwei Li 529ade37a4 config_tools: support vUART Timer pCPU configuration
This patch is to allow user to pin vUART timer to specific pCPU via ACRN
config tool. User can configure by setting "vUART timer pCPU ID" under
Hypervisor->Advanced Parameters.

Tracked-On: #8648
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
2024-07-10 10:26:21 +08:00
Haiwei Li f47b2b6860 config_tools: support vUART Tx/Rx buffer size configuration
Introduce an interface to define Tx/Tx buffer size via ACRN config tool.
User can configure under Hypervisor->Advanced Parameters.

Tracked-On: #8644
Signed-off-by: Haiwei Li <haiwei.li@intel.com>
2024-07-10 10:26:21 +08:00
dongpingx 23b1a44d40 misc: fix Vue3 version & update braces's version
Although my former patch can pass through build procedure but when
I launch configurator and try to load board.xml, the loading
procedure wont finish. So we cannot step forward anymore.

I cannot find a solution right now, so I have to fix the version
to v3.2.33 for several weeks.

This patch is applied to fix vulnerability scanned by Trivy also.
Vulnerability ID is CVE-2024-4068 & fixed version of dependency is 3.0.3.
I added one configuration item named override for package.json.

I tested and confirmed the fix is ok.

Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8626
2024-06-18 10:26:32 +08:00
dongpingx 7739f0ef2a misc: add checking while append new vm
This patch will add checking cpu affinity while user click to add new vm.
When I was following client's findings up I found that if I click to add
a new post-launched vm for step 3.Configure settings for scenario and launch
scripts, it failed to show error messages. The current version will check cpu
affinity and serial port for post-launched and hv when creating a new vm, it
wont verify when adding new post-launched & pre-launched vms, it will fail to
save scenario configuration file without any explanation. I've rebuilt and run
configurator, confirmed the checking procedure works.

Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8601
Reviewed-by: Junjie Mao junjie.mao@intel.com
2024-06-17 11:40:24 +08:00
shuaizhx db782cff1e misc: fix tauri's vulnerability
The vulnerability was scanned by Trivy on May 28,2024.
Vulnerability ID is GHSA-xphf-cx8h-7q9g and severity is medium,
with title iFrames Bypass Origin Checks for Tauri API Access Control.
I fixed the crash and checked by build-install-launch procedure, I confirm it was solved.

Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8613
2024-05-30 22:23:51 +08:00
shuaizhx 9810bda461 misc: fix v-model used on props for vue3 make strictly checking
I make this change during recent building configurator but got a failure.
The change is to fix the problem caused by vue3's strictly syntax chacking.
It is reported for newly releases only and before v3.2.25 it is a warning.
I follow the error message and suggestion to change the code.
Error message said "v-model cannot be used on a prop,
because local prop bindings are not writable".
Suggestion said "Use v-bind binding combined with v-on listener to emit update"
I ran the build & install procedure to verify the problem was solved.

Signed-off-by: dongpingx <dongpingx.wu@intel.com>
Tracked-On: #8596
2024-05-16 20:39:54 +08:00
shuaizhx 69e4b936a8 misc: fix dependencies issue for h2, mio and postcss
Reported by dependabot and scanned by Trivy, there are two dependancies
for Rust crates and one for JavaScript 3rd-party library.
Select the correct versions to fix the issue and verify already.

Tracked-On: #8592
2024-05-09 19:30:16 +08:00
Yonghua Huang a7a6732580 config_tools: support IVSHMEM devices region ID configuration
This patch adds ivshmem region ID configuration support when user
   configure ACRN IVSHMEM devices via ACRN config tool, this ID provides
   VMs with a stable identification of multiple shared memory regions.

   Also add logic to generate launch script with region ID configured
   as below:
   `add_virtual_device  8 ivshmem hv:/shm_region_0,256,1`

Tracked-On: #8566
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2024-03-28 14:34:38 +08:00
dependabot[bot] edeb5fe9ca build(deps): bump openssl
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.55 to 0.10.60.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.55...openssl-v0.10.60)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 16:03:38 +08:00
dependabot[bot] fcff5ede9c build(deps): bump rustix
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.37.23 to 0.37.25.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.37.23...v0.37.25)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 14:33:34 +08:00
Kunhui-Li adc384b9ac configurator: update tauri version
update tauri version to 1.4.1 fix security vulnerability for configurator
dependent library.

Tracked-On: #8445
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2023-07-18 16:30:09 +08:00
dependabot[bot] ac6dba53a7 build(deps): bump xml-rs
Bumps [xml-rs](https://github.com/kornelski/xml-rs) from 0.8.4 to 0.8.14.
- [Changelog](https://github.com/kornelski/xml-rs/blob/main/Changelog.md)
- [Commits](https://github.com/kornelski/xml-rs/compare/0.8.4...0.8.14)

---
updated-dependencies:
- dependency-name: xml-rs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 13:29:45 +08:00
dependabot[bot] 1e74dec700 build(deps-dev): bump vite in /misc/config_tools/configurator
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.13 to 2.9.16.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v2.9.16/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.9.16/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 12:57:50 +08:00
dependabot[bot] e0e9c4eb61 build(deps): bump openssl
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.51 to 0.10.55.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.51...openssl-v0.10.55)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-27 12:22:06 +08:00
Jiaqing Zhao a41f600a3c config_tools: remove rstcloth package
9c2d0f8858 ("config_tools: replace RstCloth library with class.")
removes all usage of rstcloth in code, but the rstcloth package is not
removed from acrn-configurator and it will still download dependencies
for rstcloth. This patch simply removes it.

Tracked-On: #8395
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2023-05-16 11:54:00 +08:00
dependabot[bot] b2aecb2731 build(deps): bump openssl
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.38 to 0.10.51.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.38...openssl-v0.10.51)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 11:12:55 +08:00
dependabot[bot] c8bf91c788 build(deps): bump tokio
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.24.1...tokio-1.25.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 18:38:55 +08:00
dependabot[bot] 5b89fb0bae build(deps): bump bumpalo
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.9.1 to 3.12.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.9.1...3.12.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 13:49:51 +08:00
dependabot[bot] 90c9f99a8d build(deps): bump tokio
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.17.0 to 1.24.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.17.0...tokio-1.24.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 16:19:18 +08:00
Yuanyua Zhao 07bf31da1f config_tools: set 'own_pcpu' of RTVM
For STANDARD_VM 'own_pcpu' default value is 'n'. But RTVM always own pCPUs.
So check 'own_pcpu' of RTVM and make sure it's set to 'y'.

Tracked-On: #8253
Signed-off-by: Yuanyua Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-30 16:35:02 +08:00
dependabot[bot] 43aec3d2a3 build(deps-dev): bump vite in /misc/config_tools/configurator
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.6 to 2.9.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.9.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 16:57:48 +08:00
yuchuyang 504e49a567 config-tools: generate config_summary.rst
Generate config_summary.rst when saving scneario XML and launch scripts.

Tracked-On: #8300
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-14 09:53:53 +08:00
yuchuyang 089ea130a7 config-tools: fix virio GPU rendering issue
Fix the following issues:
1. <gpu> and <displays> elements are added to scenario XML when they are not configured.
2. Virtio GPU components disappears after switching to another tab and switching back to
   previous tab.
3. Wrong error message of vertical offset checking.

Improve the error check in virtio_devices.xsd:
1. Every window virtual display need to configure window resolution, horizontal offset
   and vertical offset.
2. Any display's elements need to be configured. The existing code
   only check the first window resolution, horizontal offset, vertical
   offset and monitor id.

Tracked-On: #8292
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-08 09:45:54 +08:00
Yuanyuan Zhao 138499f886 config_tools: add own_pcpu widget
Add "exclusively owns physical CPUs" checkbox to pre-launched VMs
and post-launched VMs. RTVM will not display this checkbox.
If this checkbox is set, the VM will use all the pCPUs assigned to
it alone.

Tracked-On: #8253
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-04 12:44:54 +08:00
yuchuyang 3bb70efa12 config-tools: re-rendering the data after importing different board XML
Switch tag in order to trigger the component re-rendering after importing
different board XML.

Tracked-On: #8288
Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-04 11:33:02 +08:00
Yang,Yu-chu aada036ac6 config-tools: clean up the vm names which do not exist
Clean up vm_name of vuart and/or VM_NAME of IVSHMEM which is not defined in
//vm/name while loading scenario XML.

Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Rviewed-by: Junjie Mao <junjie.mao@intel.com>
Tracked-On: #8270
2022-10-28 11:17:46 +08:00
Kunhui-Li ad17268c5e config_tools: add virtio gpu widget
add virtio gpu widget for the new design.

Tracked-On: #7970
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 08:15:17 +08:00
TrellixVulnTeam a4f1a2f185 Adding tarfile member sanitization to extractall() 2022-10-20 14:58:52 +08:00
Junjie Mao 7ce49f8c3c config_tools: determine SSRAM_ENABLED automatically
Today users are able to tweak whether the hypervisor includes support to
software SRAM (SSRAM). This, however, gives rise to potential functional
incorrectness when the hypervisor is not built with such support but a
service VM attempts to assign SSRAM to a post-launched VM (which is
possible as the service VM can still see the SSRAM-related ACPI tables). In
such cases the SSRAM assigned to a post-launched VM is not properly
initialized and thus not locked in cache.

As makes little sense for a user to configure the SSRAM support in the
hypervisor in a different way as the presence of SSRAM on hardware, this
patch removes the "SSRAM support" option from the configurator. The config
tools will now automatically enable the SSRAM support if the hardware
supports the feature and disable that otherwise.

Tracked-On: #8231
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-14 15:20:48 +08:00
Yang,Yu-chu 914e7a1d25 config-tools: check if the cpu_affinity is null
The cpu_affinity is null when creating a new scenario. Do not update the
pcpu properties if the cpu_affinity is null.

Tracked-On: #8145
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2022-10-08 10:31:11 +08:00
Chuang Ke 50cdcb3660 [config_tool] Message when CAT not supported
use better wording instead the message when CAT not supported

Tracked-On: #8136
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
2022-09-22 23:14:01 +08:00
Chuang Ke a35f3c0d65 [config_tool] vCAT widget behavior
let vCAT chunk no longer  fixed-drag

Tracked-On: #8187
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-09-21 16:51:03 +08:00
Yang,Yu-chu 0d7527ce2f config-tools: diable real_time_vcpu for non real-time VM
Reset the real_time_vcpu to 'n' if the VM is not a real-time VM.

Tracked-On: #8145
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-09-16 10:18:01 +08:00
Yang,Yu-chu c17c8e321c config-tools: fix typos of UI and README
1. In the title "Create a new Scenario", capitalize the "N" in "new".
2. Fix the file path to the installer.

Tracked-On: #8137
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-09-14 08:44:57 +08:00
Chuang Ke 8577e158df [config_tool] v2 UART widget address for pre-launched VM doesn't update
the configurator can clear its corresponding I/O port or BDF settings automatically when the VM of a vUART endpoint changes
v1-->v2: support the result working on multiple VUART Connections

Tracked-On: #8033
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-09-09 14:04:54 +08:00
Chuang Ke cafb562597 [config_tool] Duplicate error for vUART connection
improve the translateError function by adding a condition: if there are errors describing the same error and same paths, remove the repeat one.

Tracked-On: #8117
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-09-08 18:52:21 +08:00
Chuang Ke d60f769179 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:05:24 +08:00
Chenli Wei 7b69ca390a 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 23:24:40 +08:00
Yuanyuan Zhao 4c17ab47eb 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-29 17:48:12 +08:00
Junjie Mao f78c8f4660 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-29 17:48:12 +08:00
Chuang Ke 3942af905c [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 20:47:17 +08:00
zihengL1 b16fcda6b5 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: Ziheng Li <ziheng.li@intel.com>
2022-08-26 16:56:16 +08:00
Chuang Ke c411dbdfbf [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:59:28 +08:00
Chuang Ke 68a7854052 [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 11:05:28 +08:00
Chuang Ke 2e4a373abb [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-24 10:27:52 +08:00
Chuang Ke e47d0e2b2a [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 16:48:43 +08:00
Chuang Ke 731d2171c7 [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 16:13:43 +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