Commit Graph

1384 Commits

Author SHA1 Message Date
Kunhui-Li e906270dd3 config_tools: highlight success or fail status in save window
changing the green or yellow icon to highlight success or fail status
in save window.

Tracked-On: #7958
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-08-15 14:15:25 +08:00
Liu Long 237d07b9bd ACRN:SampleApplication: Copy RT kernel scripts
Add the copy RT kernel for the create image scripts.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-15 11:17:51 +08:00
Liu Long c59dcc0042 ACRN:SampleApplication: Update the image build scripts
1. Add the generic extra kernel modules for HMI VM, in case the
uio_pci_generic modules is missed.
2. Add ssh server for HMI VM.
3. Add specific version for python numy modules.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-15 09:19:15 +08:00
Liu Long a4094b9eeb ACRN: Scripts: Modify the create images scripts
1. Create a build directory for store images so that the git will not trace the
images.
2. Disable more systemd server in RT-VM in case the error output in
console.
3. Add the make sampleapplication command in the scripts.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-15 09:19:15 +08:00
David B. Kinder 4ef991effb doc: add MCE check avoidance explanation
Add a reference to the intel.com white paper on MCE avoidance to the
Disable MCE Workaround configuration option

Tracked-On: #7978

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-08-12 16:48:49 +08:00
zihengL1 22184ac99a config-tools: solve hv and vm memory address conflict
Fixed the problem that acrn can still build normally
when the memory addresses of HV and VM conflict, which
causes the hypervisor to hang.

At the same time, defined a class to process memory to
obtain and check the available memory range.
Memory range obtain and check related functions are
defined as class methods.

Tracked-On: #7913
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-08-12 16:26:50 +08:00
Chenli Wei a7397dedf0 misc: add assert to check the vBDF conflict
The current ACRN-Configurator just check the conflict of user setting.
have not check the conflict with native PCI device's bdf.

This patch add an assert to check the above conflict.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-11 15:34:21 +08:00
Liu Long a72a2e1795 SampleApplication: Add the proxy setting for HMI
Add the proxy config file for the HMI VM images, in case install
the packages failed.

Tracked-On: #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-10 16:21:37 +08:00
David B. Kinder b8c85135d9 doc: update Security VM Features config option
Updated the description of Security VM Features per review comments, and
made the option visible (again) in the configurator as an advanced
hypervisor option.

Created a new glossary entry for "Security VM", referenced by this new
description and tooltip.

Tweak wording of virtio console and input device descriptions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>

Tracked-On: #7968
2022-08-10 10:09:58 +08:00
Chuang Ke 481173bf50 v2-config_tool-Instruction-missing-for-L2-only-users
v1-->v2:
1. instruction displayed regardless of if L3 or L2 cache were available, now it displayed instructions accordingly no matter how many caches
2. let instructions displayed only once above the topmost CAT configuration table

Tracked-On: #7921
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-09 22:15:27 +08:00
Kunhui-Li b5097ee3e3 config_tools: fix vBDF schema pattern issue
add escape charater to fix vBDF pattern match any character issue
for vUART and ivshmem.

Tracked-On: #7925
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-09 21:45:47 +08:00
Junjie Mao 3f0eb96d85 sample_app: Add scripts to create RT and HMI VM images
Creating VM images is always a pain to users, and it is especially the case
for those who want to set up the ACRN sample application which needs two
different VM images, one with graphical desktop and the other optimized for
real-time.

This patch introduces the so-called "image builder" utility which is a set
of scripts that can automate the creation of those VM images. The scripts
will take care of:

  - Forking image files based on Ubuntu cloud images and enlarge the root
    file system per needs.

  - Setting up users and passwords.

  - Installing necessary packages to run either the graphical desktop or
    real-time applications.

  - Specific to the RT VM image, disabling services and tweaking kernel
    command line for optimized real-time performance.

  - Copying the sample applications into the images so that users can
    start them directly, after they launch the VMs.

Tracked-On: #7820
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-08 08:26:43 +08:00
Chuang Ke 88ed588711 vUART and IVSHMEM widgets don't generate address
[config_tool] vUART and IVSHMEM widgets don't generate address

Tracked-On: #7942
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 16:43:32 +08:00
weizhang ddefbfa6b9 SampleApplication: Change the unit of result
Correct the unit of sample-application result, which should be us(microseconds).

Tracked-On #7820
Signed-off-by: Zhang Wei <wei6.zhang@linux.intel.com>
2022-08-05 10:35:10 +08:00
Junjie Mao 2a8b80d0c1 config_tools: board_inspector: guess L3 CAT parameters if not reported via CPUID
On some platforms the L3 CAT capabilities are not reported via CPUID even
though they are present. The public real-time tuning guide suggests to try
accessing the MSRs directly to detect if L3 CAT is available or not.

This patch implements such guessing logic in the board inspector in order
to enable CAT for users with those kinds of platforms.

Tracked-On: #7948
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao 67d7b8f4c8 config_tools: board_inspector: fix MSR reads and writes
The MSR reading and writing routines today has the following issues:

  1. The missing of /dev/cpu/*/msr is not properly captured as it is
     reported via FileNotFoundError rather than IOError.

  2. The wrmsr logic is not updated to use the tmpdevfs msr file.

This patch fixes the issues above which is a prerequisite of adding
additional MSR parsing classes.

Tracked-On: #7948
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao a6614e7e2f config_tools: board_inspector: refactors MSR utilities
In v3.0 the msrfield class has its initializer changed in a way that is
incompatible with the parameter names or the getter/setter. When introduced
from the BITS project, that class allows specifying an MSR field of
arbitrary length by being given the index of the most and least significant
bits.

This patch restores the original behavior of that msrfield class and moves
the use-case specific methods, namely is_vmx_cap_supported and
is_ctrl_setting_allowed, to a helper class.

Parsing of the VMX capability reporting MSRs in msr.py are updated
accordingly, and brief documentation of the MSR fields are added as well.

Tracked-On: #7948
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao 4369896549 config_tools: acpi_gen: generate vRTCT instead of copying a physical one
As the last step to simplify the steps to enable software SRAM passthrough
to a pre-launched RT VM, this patch generates a virtual RTCT which only
contains a compatibility entry (to indicate that the format of the RTCT is
v2) and a couple of SSRAM or SSRAM waymask entries to report the software
SRAM blocks that pre-launched VM has access. That follows the practice how
ACRN device model generates virtual RTCT for post-launched VMs today.

In case RTCT v1 is used physically, this patch still generates a v2 RTCT
for the pre-launched VM but does not add an SSRAM waymask entry there
due to lack of information.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao eff353700e config_tools: acpi_gen: refactor ACPI table generation logic
While functionally correct, the ACPI table (mostly DSDT) generation logic
in asl_gen.py contains multiple occurrences that share the same code
structure as follows:

    cls = <class of the table>
    length = ctypes.sizeof(cls)
    data = bytearray(length)
    res = cls.from_buffer(data)
    <setting multiple fields in res>

To minimize code duplication, this patch refactors the logic by abstracting
the creation of an ACPI table into a method which returns a newly created
object of the given class after setting the specified fields.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao 89d54aa5d1 config_tools: board_inspector: record all details from RTCT in board XML
Today users still need to manually copy the RTCT binary file when they want
to passthrough software SRAM to a pre-launched RTVM, which is far from
being user friendly.

To get rid of that step, this patch extracts all information from the RTCT
table and format them in the board XML which is the only file users need to
copy from their target platform to build the hypervisor. The patch that
immediately follows will then use such information to generate vRTCT for
the pre-launched VM.

A side effect of this change is that more ranges, which represents those
reported by RTCT such as the CRL binary or the error log area, will be
added to the `memory` section of the board XML. The `id` attributes of
those range will be used to identify what that range is for. As a result,
getting RAM of the physical platform from the board XML requires additional
conditions on the `id` attributes to avoid counting non-RAM regions
unintendedly.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Junjie Mao d7bac88e5e config_tools: board_inspector: refactor ACPI RTCT parser
This patch refactors and fixes the following in the ACPI RTCT parser of the
board inspector.

  1. Refactor to expose the RTCTSubtableSoftwareSRAM_v2 class directly as
     it is a fixed-size entry. There is no need to create a dynamic class
     which is mostly for variable-length entries.

  2. Rename the "format" field in RTCT entry header to "format_or_version",
     as that field actually means "version" in RTCT v2.

  3. Properly parse the RTCT compatibility entry which is currently parsed
     as an unknown entry with raw data.

Tracked-On: #7947
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-08-05 07:36:40 +08:00
Liu Long b7d70385d9 SampleApplication: Add Makefile for the entire SampleApplication
Add the Makefile in the SampleApplication root directory. User
don't need to separate build the userapp and rtapp, just need make
once at the SampleApplication root directory.

Tracked-On #7820
Signed-off-by: Liu Long <long.liu@linux.intel.com>
2022-08-04 14:22:39 +08:00
Chenli Wei 6ac196d982 misc: add assert to check the duplicate devices
The current ACRN-Configurator allow user add duplicate PCI devices to
passthrough which it is not correct.

This patch add an assert to check the duplicate of PCI devices.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-03 15:34:06 +08:00
Chuang Ke 670ccf21f8 config_tool: Instruction missing for L2-only users
In the cache widget, there are instructions: "Drag the ends of the boxes to cover the cache chunks you want to allocate to specific VMs. If you have a real-time VM,ensure its cache chunks do not overlap with any other VM's cache chunks."

Tracked-On: #7921
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-08-02 08:43:53 +08:00
Kunhui-Li fa8c149a38 cofig_tools: apply vBDF pattern check to vUART and ivshmem
apply vBDF pattern check to vUART and ivshmem.

Tracked-On: #7925
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-07-29 17:33:07 +08:00
Kunhui-Li 9a5f42e187 config_tools: add tooltips for cpu affinity
add tooltips for cpu affinity and tiny fix for virtio console device.

Tracked-On: #7933
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-07-29 17:33:07 +08:00
Kunhui-Li e83bea0882 config_tools: remove invaild hugepage check
Currently, on the whl-ipc-i5 platform, we found a warning message when
building ACRN with the shared scenario XML file from github.
However, this doesn't affect any feature of ACRN according to the QA's
test result.

So this patch removes this check in order not to confuse users at the first.
If necessary, we will add back the check after getting more detail.

v1-->v2
degrade the log level to debug.

Tracked-On: #7926
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-07-29 17:33:07 +08:00
Chenli Wei da44d6337a misc: refine slot issue of launch script
The current launch script allocate bdf for ivshmem by itself and have
not get bdf from scenario.

This patch refine the above logic and generate slot by user settings.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-07-29 17:03:45 +08:00
Chuang Ke c46c78591d [config_tool] Order of plus and minus icons is inconsistent
let minus icons in front of plus icons in those views below: Virtio input device, Virtio network device, Virtio console device, CPU affinity.

Tracked-On: projectacrn#7917
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-07-27 20:57:25 +08:00
chuangxke e5a9c36095 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

Tracked-On: #7898
Signed-off-by: Chuang-Ke chuangx.ke@intel.com
Reviewed-by: Junjie Mao junjie.mao@intel.com
2022-07-27 20:22:35 +08:00
Weiyi Feng 715a597e37 config_tools: fix CAT data can not be load back issue
fix CAT data can not be load back issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <fwy1998@gmail.com>
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-07-27 09:54:36 +08:00
chuangxke a3449c4893 config_tools: add two spaces for error messgae.
add two spacings in alert sentence.

Tracked-On: #7915
Signed-off-by: Chuang-Ke <chuangx.ke@intel.com>
Reviewed-by:Junjie Mao <junjie.mao@intel.com>
2022-07-25 10:32:26 +08:00
zihengL1 6ced747e10 config-tools: fix board inspector crashed error
Fixed the problem of exception handling of the
incoming type error in reading GSI number method
in 40-acpi-tables.py line 37 when dmesg command
line is too long.

Tracked-On: #7906
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-07-22 10:15:21 +08:00
Kunhui-Li de8877e71a config_tools: add tooltips for virtio devices
add tooltips for virtio network, input and console.

Tracked-On: #7897
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-07-21 16:49:36 +08:00
Kunhui-Li 3aee139da9 config_tools: left-align the plus icon in the virtio devices
left-align the plus icon in the virtio devices so that they
match the alignment in the IVSHMEM widget.

Tracked-On: #7897
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-07-21 16:49:36 +08:00
Yifan Liu 2edd704a3b misc: configurator: bugfix: incorrect path split
Board files with multiple dots in their name may be splitted
incorrectly, and os.path.basename assumes os.name == posix in pyodide
environment. This workaround partially fixes this problem whenever the
the board filename does not contain '\' character.

Tracked-On: #7582
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-07-20 12:19:42 +08:00
Yifan Liu 63ff99a8da misc: configurator: fix minor typo
Tracked-On: #7707
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2022-07-20 12:19:42 +08:00
Weiyi Feng fd8c9800ae config_tools: add icon for configurator
add icon for configurator

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-07-20 11:48:27 +08:00
David B. Kinder fed4f81e30 doc: include sample app doc but unhook from toctree
Documentation for the sample app isn't ready for the public, so let's
not add it to the toctree yet (use the :orphan: role to stop Sphinx from
complaining about an unreferenced .rst file)

Tracked-On: #7820

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-07-20 09:36:03 +08:00
Geoffroy Van Cutsem 7b25da00ae doc: add ACRN Sample App doc to toctree
Add the ACRN Sample App document (README.rst) to the toctree
Convert the README.rst from Dos to Unix text file format

Tracked-On: #7820
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-07-20 09:36:03 +08:00
Matthew Leon 0e0bf3321f Fix string bug in webapp
Tracked-On: #7820
Signed-off-by: Matthew Leon <matthew.leon@intel.com>
2022-07-20 09:36:03 +08:00
Matthew Leon dcb01e1de2 Fix bugs and clean up code
Tracked-On: #7820
Signed-off-by: Matthew Leon <matthew.leon@intel.com>
2022-07-20 09:36:03 +08:00
Matthew Leon 905b31549e sample app: conform README to repo RST standard
This commit changes the README from Markdown to RST.

Tracked-On #7820
Signed-off-by: Matthew Leon <matthew.leon@intel.com>
2022-07-20 09:36:03 +08:00
Matthew Leon d8f55c7bca sample app: initial import of the sample app
This sample application allows the user to get the hypervisor and a simple Virtual Machine Scenario to run
This sample application assumes the user is following the sample app guide in the acrn hypervisor documentation

Tracked-On: #7820
Signed-off-by: Matthew Leon <matthew.leon@intel.com>
2022-07-20 09:36:03 +08:00
Kunhui-Li 39626609d0 config_tools: apply pattern check to virtio input id
this patch applies pattern check to virtio input id. Report error if
regex doesn't match.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-07-18 18:01:24 +08:00
Kunhui-Li df0c683c6c config_tools: apply pattern check to interface name
This patch applies pattern check to network interface name.
Report error if regex doesn't match.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-07-18 18:01:24 +08:00
zihengL1 047a11dff3 config-tools: hide the 'update-pciids: download failed' message
Use stderror to redirect error message to subprocess.DEVNULL
to hide it when the "update pciids" command is called.

Tracked-On: #7886
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-07-17 16:30:53 +08:00
Ziheng Li eb8bcb06b3 Update copyright year range in code headers
Modified the copyright year range in code, and corrected "int32_tel"
into "Intel" in two "hypervisor/include/debug/profiling.h" and
"hypervisor/include/debug/profiling_internal.h".

Tracked-On: #7559
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-07-15 11:48:35 +08:00
Ziheng Li d5f3643e4f config_tool: Move "BIOS Revision" line in Configurator UI
Placed the "BIOS Revision:" at the top line of BIOS
information, and change the order of the information to have
the board information to the left, and BIOS information to the right.

Tracked-On: #7884
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-07-15 11:27:50 +08:00
Junjie Mao df41ce807f config_tools: resolve incompatibility with elementpath 2.5.3
This patch adds to the customized function `number-of-clos-id-needed` more
robust checks, which ensures that a given node is a concrete element,
before that function passes the node to `get_policy_list`. This resolves
the incompatibility issue with elementpath 2.5.3 which is reported in v3.0.

Tracked-On: #7893
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-07-15 10:56:50 +08:00