Commit Graph

1472 Commits

Author SHA1 Message Date
hangliu1 0aa5ec5bda config tool:add debug mode limitation for PMU
In release mode, "GUEST_FLAG_PMU_PASSTHROUGH" is
not generated for specific VM.

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Tracked-On:#6690
2022-11-02 15:50:30 +08:00
zhangrouyu e5c1eafba3 doc: update changes to 22.04 on sample app guide
Tracked-On: #8269
Signed-off-by: zhangrouyu <rouyu.zhang@intel.com>
2022-11-01 09:56:07 +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
zhangrouyu 5a452e5e32 Create a requirements.txt for python package on GSG
Tracked-On: #8269
Signed-off-by: zhangrouyu <rouyu.zhang@intel.com>
2022-10-27 16:15:40 +08:00
Junjie Mao cdf7796a62 Makefile: clean up unnecessary phony targets
Phony targets are mostly for recipes that are expected to be invoked
directly from the command line as a target and will always be executed. As
a result, it is in most cases not appropriate for a real file target to to
depend on a phony one, as that means the file will always be regenerated.

In the Makefile today, however, dependencies on phony targets are common
and cause the hypervisor to be fully rebuilt regardless of whether an
existing build exists or not.

This patch cleans up the following phony targets which are not meant to be
targets from the command line.

  - pre_build: This target has three outputs, namely the prebuild checker,
    the ACPI tables for pre-launched VMs and the serial.conf. It is split
    into three targets, one for each output.

  - headers: This target is an alias of dynamically-generated header
    files. It is replaced with a variable so that targets depending on
    "header" now depends on the actual header files generated.

With this patch, make will only rebuild modified files and targets
depending on them directly or indirectly.

Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-26 14:09:44 +08:00
Kunhui-Li 7c18e26044 config_tools: add assertions for virtio gpu
1. In the full screen mode, a VM supports 4 virtual displays at most.
2. A vm supports 2 virtual windows at most.
3. The monitor ID cannot be duplicated in the full screen mode.
4. All the display elements are in DisplayConfiguration of VMType.xsd. It
cannot be set as required. Using assertions to check if the sub-elements
are set for any type of virtual display accordingly.
 - check if a display has been added and a display type is set.
 - check if monitor ID is set for full screen virtual display.
 - check if resolution and offsets are set for window virtual display.

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
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
Kunhui-Li f165ff3b5a config_tools: update the upgrader.py script for virtio gpu
this patch updates the upgrader.py script for virtio gpu.

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
Kunhui-Li 5554040dbb config_tools: refine virtio gpu in launch script
If display type is "Windows", the generated launch script will follow
the below rule.
"virtio-gpu,geometry=<width>x<height>+<x_off>+<y_off>,geometry=<width>x<height>+<x_off>+<y_off>"

If display type is "Full screen", the generated launch script look like
this. For example:
"virtio-gpu,geometry=fullscreen:0,geometry=fullscreen:1"

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
Kunhui-Li 4f3a28d29f config_tools: refine virtio gpu device in the schema
this patch refines virtio gpu device in the schema for 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
Fei Li c76f26bdad 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-10-25 16:01:21 +08:00
Yuanyuan Zhao b5c70650cd config_tool: bdf of ioport serial port
Little fix: bdf format of inport serial port in board_inspector.

Tracked-On: #8235
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
2022-10-21 22:49:55 +08:00
TrellixVulnTeam a4f1a2f185 Adding tarfile member sanitization to extractall() 2022-10-20 14:58:52 +08:00
Yuanyuan Zhao b16aae48d0 config_tools: add pio serial port bdf to config.h
Add bdf info of pio serial port to config.h.

Tracked-On: #8235
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao junjie.mao@intel.com
2022-10-19 17:23:11 +08:00
Yuanyuan Zhao f9e16db9e1 config_tools: board_inspector: parse bdf for ioport serial controler
Add bdf infomation to ioport serial controler.

Tracked-On: #8235
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao junjie.mao@intel.com
2022-10-19 17:23:11 +08:00
Chenli Wei 7ae785a452 misc: refine the allocate logic of offline tool
The current code use VM number to calculate HV_RAM_SIZE, this is not
match the HV logic.

This patch use the max number of trusty VMs to calculate the size of
sworld memory and assume 4M ram / VM to calculate the final ACRN ram
size.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-19 15:58:25 +08:00
Junjie Mao dea357fa3b board-inspector: fix a branch condition that checks existence of HWP
Evaluating an XPATH on a tree results an empty list (rather than None) when
that tree does not contain any matching node. This patch fixes a branch
condition that does not check the XPATH evaluation result properly.

Tracked-On: #8168
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-14 15:56:43 +08:00
Junjie Mao 1c532da088 board_inspector: tolerate PCI functions with undefined header layout
While PCIe specification defines only type 0 and type 1 configuration space
headers, there can be cases where a PCI function has a different header
type. As an example, that device itself is under development or is a
special emulated device.

This patch makes the board inspector gracefully skips those PCIe functions
and continue scanning the rest in such cases, as the only impact of the
anomaly is the prevention of ACRN from passing through that PCIe function
to any VM. It is an overkill to crash the board inspector.

Tracked-On: #6689
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-14 15:56:43 +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 ce5b4435bc config-tools: add topology extract_display
This method gets connected displays andis add them as child nodes to
a corresponding graphics card.

Tracked-On: #7970
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-14 08:57:42 +08:00
Yang,Yu-chu b235e88f24 config-tools: add new extractors helpers
Add 2 helplers:
1. get_realpath: this method returns the realpath of paramenter
if it's a valid path string
2. get_bdf_from_realpath: this method returns the bus, device, function
number if the parameter is a path to /sys/devices

Tracked-On: #7970
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-14 08:57:42 +08:00
Chenli Wei 34e5061418 misc: modify hidden_pdev_list to fix build issue
This patch remove a invalid variable from hidden_pdev_list to fix an
build issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-10-08 17:26:08 +08:00
Wu Zhou 41b2d6baee config-tools: generate CPU frequency limits
This patch is to generates frequency limits for each CPU, as a set of
data structure in hypervisor .c code.

With the frequency limits data, the hypervisor performance manager does
not have to deal with the CPU/board info. It just choose the
highest/lowest/guaranteed performance level and performance/nominal
p-state, and use them to construct HWP_REQUEST/PERF_CTL reg value.

How are frequency limits decided:
  - For CPUs in standard VMs, frequency limits are just decided by
    CPU/board info.
  - For CPUs assigned to RTVMs, we want certainty in latency, so just
    set its frequency to nominal/guaranteed by letting highest=lowest.
  - In some cases, CPUs are sharing frequency on hardware level
    (e.g. ADL e-cores in group of 4). This is described as _PSD in ACPI
    spec, or 'frequency domain' in Linux cpufreq driver. Thoese CPUs'
    frequency are linked together. If one of them are running RTVM,
    all other CPUs in the domain should be set to the same frequency.

Tracked-On: #8168
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-08 11:13:21 +08:00
Wu Zhou 635120e3f2 config-tools: extract CPU frequency info in board_inspector
This patch adds CPU frequency info extraction for board_inspector.

It is supposed to be used by ACRN CPU performance management.

Including those:
  - Capabilities for HWP base regs, and turbo boost, by reading cpuids.
  - Reporting all CPUID bits in LEAF 06H.
  - Max none turbo ratio and max turbo ratio, by reading MSRs.
  - HWP capabilities, by reading IA32_HWP_CAPABILITIES. Reading this
    register requires HWP enabled in IA32_PM_ENABLE. (SDM Vol3 14.4.2:
    Additional MSRs associated with HWP may only be accessed after HWP
    is enabled)
  - ACPI _PSD info, by reading sys nodes of Linux acpi-pstate driver.
    This table describes frequency domains in which CPUs shares the same
    frequency.

Tracked-On: #8168
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-08 11:13:21 +08:00
Wu Zhou dd7a71900b config-tools: genertate performance policy parameter
This patch is to generate an ACRN CPU performance policy type boot
parameter.

The generated parameter is either 'cpu_perf_policy=Performance’ or
‘cpu_perf_policy=Nominal’, according to the 'CPU performance policy type'
config item in configurator.

It will then be packed into acrn-hypervisor deb file, and will be
automatically added to grub cfg file through installation.

Tracked-On: #8168
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-08 11:13:21 +08:00
Wu Zhou a971e12fc6 config-tools: add CPU performance policy option
Add 'CPU performance policy type' option to configurator. User can choose
from 'Performance' or 'Nominal' as the CPU performance policy for ACRN to
apply.

Tracked-On: #8168
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-10-08 11:13:21 +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
Yang,Yu-chu 3d8ea54f74 config-tools: reserve the secondary PCI bus mmio windows
Prevent allocator to allocate PCI bus mmio windows to other devices.

Tracked-On: #8191
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-09-30 11:51:47 +08:00
zihengL1 bef352481f config-tools: Missing tqdm python package in board_inspector.deb
Added python3-tqdm depend in gen_acrn_deb.py

Tracked-On: #8155
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-09-30 11:20:46 +08:00
Chenli Wei b287e6f8ec misc: add documentation element for CACHE_REGION
Some member of CACHE_REGION have no documentation element, this cause
some issue when we generate documentation for user.

This patch add some documentation to fix the above issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-09-30 10:49:05 +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
Junjie Mao 3a4b84e078 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-21 15:15:38 +08:00
Reyes, Amy f0eddc6a4c doc: Update acrnctrl readme
- Update broken link and minor editorial changes

Tracked-On: #8172

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-09-20 09:09:47 -07:00
zhangrouyu 7aa3df8d7d Add configuration files for ASRock system, with Intel(R) 12th Gen Core(TM)CPU(formerly known as Alder Lake) and 32G memory.
Tracked-On: #8163
Signed-off-by: zhangrouyu <rouyu.zhang@intel.com>
2022-09-19 21:48:17 +08:00
zhangrouyu 8d0131e7fb improve the document of acrnd
Tracked-On:#8148
Signed-off-by: zhangrouyu <rouyu.zhang@intel.com>
2022-09-19 12:10:59 +08:00
zhangrouyu 34776484df GSG document revision 2022-09-16 13:28:14 -07:00
zhangrouyu ef41f87171 improve the document of acrnd 2022-09-16 13:28:14 -07: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
Chenli Wei 122e97e5a1 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 18:15:29 +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
zihengL1 86314b2f18 config-tools: Fix error reporting for memory addresses below 4G
Now, if you use a memory address below 4G, there will be a warning,
but the build process of the hypervisor will not be interrupted.

Tracked-On: #6690
Signed-off-by: Ziheng Li <ziheng.li@intel.com>
2022-09-08 20:59:47 +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
Chenli Wei 7a99e1b1d8 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 18:10:56 +08:00
Chenli Wei c0e0c1a92a 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-04 21:41:12 +08:00
David B. Kinder b7d65b9d79 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:56:45 +08:00
Junjie Mao 4f1be92b67 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 15:26:39 +08:00
zihengL1 4f1e4eefc5 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: Ziheng Li <ziheng.li@intel.com>
2022-09-01 12:18:58 +08:00
David B. Kinder aac37cbfe5 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 09:01:27 +08:00