Commit Graph

7077 Commits

Author SHA1 Message Date
Junjie Mao 9f13bbc349 config_tools: abstract schema walk as a separate class
Today the script default_populator.py fills in default values by visiting
an XML schema and an XML tree simultaneously and add a node to the latter
whenever one satisfying the schema does not exist. This visiting logic is
not only useful for filling in default values, but also for upgrading
XMLs to new schemas.

This patch abstracts the flow of the visiting above as a separate class,
just like tree visitors or transformers. The current default value
populator is then refactored to extend that class by inheritance.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Junjie Mao 74071d1bd4 config_tools: move RDT-related checks to a separate file
Assertions in XML schema are placed under schema/checks as the central
place, in order to make it easier to enhance the error reporting
specifically on assertion failures in the near future.

This patch moves the RDT related assertions in the schema to a dedicate
file uner schema/checks.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Minggui Cao 6750d5a277 Revert "dm: set PMU_PT flag for CPU core partition VM"
This reverts commit 811992ee2b.

There could be some conflict with current configure tool. will fix it
later.

Tracked-On: #6966
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-14 20:18:08 +08:00
Geoffroy Van Cutsem eb070491ee doc: fix the URL for projectacrn.github.io repo
Fix the URL used to clone the projectacrn.github.io repo.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-03-10 08:02:51 -08:00
hangliu1 e83c9b6430 config tool: Fix tee guest flag
Fix tee guest flag

Tracked-On:#6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-03-10 14:35:57 +08:00
Minggui Cao 811992ee2b dm: set PMU_PT flag for CPU core partition VM
for CPU core partition VM, like RTVM, set PMU passthrough
flag for vtune/perf to run in guest VM.

Tracked-On: #6966
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-10 14:34:33 +08:00
Minggui Cao b3bd153180 hv: expose PEBS capability and MSR as PMU_PT flag
Requirement: in CPU partition VM (RTVM), vtune or perf can be used to
sample hotspot code path to tune the RT performance, It need support
PMU/PEBS (Processor Event Based Sampling). Intel TCC asks for it, too.

It exposes PEBS related capabilities/features and MSRs to CPU
partition VM, like RTVM. PEBS is a part of PMU. Also PEBS needs
DS (Debug Store) feature to support. So DS is exposed too.

Limitation: current it just support PEBS feature in VM level, when CPU
traps to HV, the performance counter will stop. Perf global control
MSR is used to do this work. So, the counters shall be close to native.

Tracked-On: #6966
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-10 14:34:33 +08:00
Minggui Cao 299c56bb68 hv: add a flag for PMU passthrough to guest VM
Add a flag: GUEST_FLAG_PMU_PASSTHROUGH to indicate if
PMU (Performance Monitor Unit) is passthrough to guest VM.

Tracked-On: #6966
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-10 14:34:33 +08:00
Minggui Cao 3b1deda0eb hv: revert NMI notification by INIT signal
NMI is used to notify LAPIC-PT RTVM, to kick its CPU into hypervisor.
But NMI could be used by system devices, like PMU (Performance Monitor
Unit). So use INIT signal as the partition CPU notification function, to
replace injecting NMI.

Also remove unused NMI as notification related code.

Tracked-On: #6966
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
2022-03-10 14:34:33 +08:00
David B. Kinder b72202e976 doc: update doc-build tutorial
Last year, GitHub announced the deprecation of the unsecured Git
protocol due to security reasons. This change will be made permanent on
March 15, 2022. Update the doc build tutorial to use https: instead of
git: protocol for cloning repos.

And while in here, clarify some of the doc build instructions.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-03-09 17:35:44 -08:00
jackwhich 5c5fbd6a5b doc: revert gsg libcjson dependency
Add gsg to install libcjson-dev dependency notes

Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-03-09 13:53:37 -08:00
Xiangyang Wu 29b2fa2310 doc: configure yajl lib for acrn driver in libvirt
Acrn driver in libvirt needs to handle JSON command or
JSON message to interact with command monitor in ACRN DM.

In libvirt, JSON APIs implementation depends on yajl lib.
So yajl should be configured for libvirt.

v1-->v2:
	Remove description about checkout hypervisor tag
	since libvirt can work on the latest hypervisor.
	Libvirt doesn't depend on acrnd and acrnctl now,
	remove acrnd and acrnctl installation in this document.

Tracked-On: #5921

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
2022-03-09 13:46:25 -08:00
Reyes, Amy 0178cf51da doc: Fix line wrap in ivshmem hld
Wrap long lines

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-03-09 13:44:10 -08:00
hangliu1 c4bf41bfd0 config tool: fixup load_order bug
fixup load_order bug

Tracked-On:#6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-03-09 13:06:15 +08:00
Tw d1e3e8d633 dm/tools: compatible with openssl3.0
HMAC_*, MD5_* and SHA256_* are deprecated since openssl3.0, replace them with the corresponding equivalents.

Tracked-On: #6743
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-08 17:39:47 +08:00
wenlingz 249c1757fc update codeowner
Tracked-On:#5581
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2022-03-08 17:36:58 +08:00
Chenli Wei 71129879d1 misc: modify vuart config for xmls
We have redesign the vuart and the UI for user, so the config tool
should change the schema and xform for the new xml, then change the
static_allocators to alloc irq for new connection.

This patch modify the xmls for vuart new design.

Tracked-On: #6690
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-03-08 17:07:48 +08:00
Chenli Wei 9450fcf3e1 misc: refine vuart connection
We have redesign the vuart and the UI for user, so the config tool
should change the schema and xform for the new xml, then change the
static_allocators to alloc irq and io_port for new connection.

This patch add a new vuart connection type and change the xforms to
adapter the new type.

Tracked-On: #6690
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-03-08 17:07:48 +08:00
Chenli Wei c4c7835c12 hv: refine the vept module
Now the vept module uses a mixture of nept and vept, it's better to
refine it.

So this patch rename nept to vept and simplify the interface of vept
init module.

Tracked-On: #6690
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2022-03-08 16:41:46 +08:00
Kunhui-Li d9a80dc746 config_tools: fix the issue that doesn't offline CPU in SCHED_NOOP mode
Fix the issue that doesn't offline CPU in SCHED_NOOP mode.

Tracked-On: #7172
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-04 10:31:19 +08:00
Kunhui-Li 08f7c2582c config_tools: remove some obsolete code
Since PRs #7115 and #6664 have landed, the ivshmem and hv_ram_size have
been refined, some related checks are obsolete in config tool.
So we remove these checks here.

Tracked-On: #7136
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-03-03 14:40:59 +08:00
Xiangyang Wu ecf99c45a3 Misc: life_mngr: support user VM reboot
Add user VM reboot command and related command handler in
lifecycle manager to support user VM reboot.

Libvirt will send user VM reboot command to lifecycle manager
of service VM through socket, this command is forwarded to the
specified user VM, user VM will execute reboot command to start
reboot itself.

v1-->v2:
	Update some interfaces name to make it reable:
        (1) enable_uart_channel_dev_resend -->
	start_uart_channel_dev_resend
	(2) enable_all_uart_channel_dev_resend -->
	start_all_uart_channel_dev_resend
	(3) disable_uart_channel_dev_resend -->
	stop_uart_channel_dev_resend
	(4) get_reboot_flag --> get_user_vm_reboot_flag

Tracked-On: #5921

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-03-03 14:40:04 +08:00
David B. Kinder 0aca3f5a7a doc: fix doc build error for removed options
PR #7167 removed configuration options that were referenced by
documentation.  Remove those references.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-03-02 22:39:45 -08:00
wenlingz c234d58428 version:3.0-unstable
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2022-03-02 18:05:45 +08:00
hangliu1 5e6341ee89 doc: remove guest_flag and NVMX_ENABLE
Global parameter NVMX_ENABLE is removed from user interface,
and remove guest_flag

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-03-02 15:50:23 +08:00
hangliu1 c2695f290d config tool: remove guest flag for scenario xml
remove guest flags and add lapic_passthrough field

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-03-02 15:50:23 +08:00
hangliu1 0068d4e826 config tool: remove guest_flags in user interface
The concept of guest_flags is hard to understand for users.
So turn guest_flags into several parameters in config tool
user interface, list as below:

GUEST_FLAG_LAPIC_PASSTHROUGH ---> lapic_passthrough
GUEST_FLAG_IO_COMPLETION_POLLING ---> io_completion_polling
GUEST_FLAG_VCAT_ENABLED ---> virtual_cat_support
GUEST_FLAG_SECURE_WORLD_ENABLED ---> secure_world_support
GUEST_FLAG_HIDE_MTRR ---> hide_mtrr_support
GUEST_FLAG_NVMX_ENABLED ---> nested_virtualization_support
GUEST_FLAG_SECURITY_VM ---> security_vm
GUEST_FLAG_RT ---> vm_type(RTVM)
GUEST_FLAG_TEE ---> vm_type(TEE_VM)
GUEST_FLAG_REE ---> vm_type(REE_VM)

In addition, HV global parameter NVMX_ENABLE is removed
from user interface, when config tool detects more than
one VM with nested_virtualization_support, NVMX_ENABLE is
assigned as 'y' automatically.

v1->v2:
*Rebase on the latest xml schema checking change
*Remove "all rights reserved" from the license header in guest_flags.py

v2->v3:
*Change the name of the new config items to CAPITAL_CASE style
*Combine guest flag policy to an XPATH in guest_flags.py
*Use count() to directly deduce NVMX_ENABLED in config_common.xsl and
update `boolean-by-key-value` to process 'true'

v3->v4:
*Change the name of the new config items to lower_case style
*Change guest_flag_node to allocation_vm_node in guest_flags.py
*Separate value case and key case for boolean-by-key-value

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-02 15:50:23 +08:00
Kunhui-Li 1034443796 config_tools: fix the issue that fail to get apic_id node
Update the XPATH of apic_id to tolerate the variance of reported
intermediate levels.

Tracked-On: #7159
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-02 11:31:28 +08:00
dongshen ce7b38ee04 dm: fixed a bug where mptable failed to wake up CPU1# when adding acpi=off into User VM cmdline
Previous commit introduced the "use physical APIC IDs as vLAPIC IDs for VMs" change,
but it didn't update the apic_id in mptable. Changed the mptable code to also
set apic_id to physical APIC ID to fix the bug

Tracked-On: #7146
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2022-03-02 11:22:31 +08:00
David B. Kinder 723f86a578 doc: remove build problem in release notes
when an XML option was removed, it will break documentation links to
that option information.  We'll remove the link in the old release notes
to fix this problem.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-03-01 18:11:24 -08:00
David B. Kinder eed4ef3ab8 doc: add header notice on latest documentation from master
The master branch is considered unstable and under development. We need
to remind developers of this and refer them to the available stable release
documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-03-01 14:25:32 -08:00
Reyes, Amy 5c52f6fc2c doc: Style cleanup in timer hld
- Minor style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-02-28 12:17:00 -08:00
David B. Kinder 0283202193 doc: fix docs with missing newline at EOF
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-02-28 12:16:18 -08:00
Reyes, Amy a98f623a35 doc: Style cleanup in ivshmem hld
- Minor style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-02-28 10:46:06 -08:00
Kunhui-Li cbce5c7775 config_tools: fix the board inspector exit issue
Fix the issue that board inspector exit after showing warning message.

Tracked-On: #6689
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-02-28 11:23:38 +08:00
Geoffroy Van Cutsem af8b51a63f Makefile: remove default BOARD and SCENARIO values
Remove the fact that a default BOARD and SCENARIO are used in case there was
none provided by the user, nor any available from a previous build. Up until
now, if that was the case, a build was triggered using a default set of BOARD
and SCENARIO values. The 'make' command will now error out asking the user to
specify those parameters.

Tracked-On: #7112
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-02-28 10:04:15 +08:00
Reyes, Amy 49e234129f doc: Tarball installation
- New document about building tarball files for ACRN installation.
- Steps are from GSG.

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-02-27 13:39:21 -08:00
Reyes, Amy 0d280ced2f doc: Style cleanup in guides
- Minor style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-02-27 13:34:32 -08:00
Reyes, Amy 72a9b7bae3 doc: Style cleanup in usercrash, trusty, vuart docs
- Minor style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-02-27 13:33:21 -08:00
Reyes, Amy 85fe6d7d1a doc: Style cleanup in dm, gpio, interrupt hld
Minor style changes per Acrolinx recommendations and for consistency

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-02-27 13:29:48 -08:00
Yang,Yu-chu eb78f1bb7c config-tools: add console=ttyS0 to bootargs
Add missing console=ttyS0 to service-VM's bootargs.

Tracked-On: #7127
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2022-02-25 09:31:17 +08:00
Yang,Yu-chu 2dd5bbd959 config-tools: remove SERIAL_CONSOLE extracion for bootargs of SOS
Remove the logic to parse SERIAL_CONSOLE and append to bootargs. Specify the console in bootargs directly.

Tracked-On: #7127
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2022-02-25 09:31:17 +08:00
jackwhich dad8834e23 doc: remove obsolete content in document
remove obsolete content in Document

Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-02-22 21:06:43 -08:00
David B. Kinder d1b2b58b19 doc: limit search engines scan on older content
Update robots.txt to exclude older documentation versions: 0.? 1.? and 2.0 through 2.4

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-02-22 11:30:14 -08:00
Reyes, Amy 7c304539b4 doc: Update terms in vUART tutorial
- Update scenario names

Tracked-On: #6701
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-02-22 09:50:39 -08:00
jackwhich bd02de15b0 doc: Remove modprobe msr in gsg
modprobe msr has been added to board_parse.py in PR #6692.

Remove modprobe msr in gsg and board_inspector docs

Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-02-22 09:45:29 -08:00
Chenli Wei b41ff11a9c doc: add UID parameter for acpidev_pt
Now the acpidev_pt module only use the hid to check the device,it can't
work well if there are more then one instance.

So this patch add UID to identify same type device to fix these issue.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-02-22 09:44:02 -08:00
hangliu1 9f8231e7ba config tool: xml change for vm_type and load_order
change vm_type and add load_order in all scenario xml

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-02-22 16:25:27 +08:00
hangliu1 816a88f7f7 config tool: add load_order and redefine vm_type
This patch includes:
1.add load_order(PRE_LAUNCHED_VM/SERVICE_VM/POST_LAUNCHED_VM) parameter
2.change vm_type parameter to values as RTVM, STANDARD_VM, TEE, REE
  TEE and REE are hide in UI.
3.deduce vm severity in vm_configuration from vm_type and load_order

This patch not includes:
change for scenario_config and functions called by scenario_config about checking

v2->v3:
*Refine template load_order

v1->v2:
*Change variable name from vm_type to load_order
*Change LoadOptionType to LoadOrderType
*Change VMOptionsType to VMType
*Add TEE_VM/REE_VM description
*Refine acrn:is-pre-launched-vm

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-02-22 16:25:27 +08:00
Geoffroy Van Cutsem bb9db70c97 Makefile: detect if 'dpkg' is available
The 'dpkg' utility is required in order to build Debian packages. If it is not
installed and available on the build system, the 'make' instructions will fail
with a Python traceback. Fix this by detecting its availability and doing a
graceful exit if not (or simply skip the step).

Tracked-On: #7109
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Co-authored-by: David Kinder <david.b.kinder@intel.com>
2022-02-22 16:23:46 +08:00