Splitting the definitions of a post-launched VM into two files, namely the
scenario XML and launch XML, introduces duplicated field in both files and
leads to a high probability of having inconsistencies between them (see
issue #7156 as an example). Further more, this split has also adds much
complexity to the configurator which has to either hide some of the items
from user interfaces or synchronize different fields upon changes.
The advantage of the split, however, is not widely adopted. Having a
separate XML capturing the VM definition tweakable in the service VM at
runtime seems to give users more flexibility to redefine a VM without
recompiling the hypervisor. But that is not a common practice in the
industry segment; instead it is preferred to have a static scenario
definition to make sure that all resources are allocated carefully in a
fixed manner in order for better determinism.
As a result, this patch merges the fields in launch XMLs into the schema of
scenario XMLs. Some fields are post-launched VM specific and thus added,
while the others have similar items in scenario XMLs today.
The launch script generator is also updated accordingly to generate launch
scripts from the new scenario XMLs (which now contain the same amount of
information as previous launch XMLs).
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This patch adds the following annotations to the config items defined in
the schema of scenario XMLs:
- acrn:title, which defines the human-readable label of the corresponding
widgets in the configurator.
- acrn:views, which controls in which view(s) this item shows in the
configurator.
- acrn:applicable-vms, which specifies the kinds of VMs (pre-launched,
post-launched and/or service VM) this item applies to. An item not
applicable to a certain type of VM will not be shown in the
configurator, and will trigger validation error if that item exists for
a VM of that specific type.
v1 -> v2:
* Preserve the CPU affinity settings for service VMs. This will be needed
later when we want to restrict the available CPUs the service VM can use at
runtime (but not at initialization time).
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
A shared memory region can be provided either by the hypervisor or by the
device model. Before recent schema changes this is telled by the "hv:/" or
"dm:/" prefix.
This patch adds another node under an IVSHMEM region to represent the
provider, following the practice that information in the old-school
encodings is split and put as separate XML nodes.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This patch drops a few config items which are no longer needed, including:
- vm.os_config.name
- vm.UEFI_OS_LOADER_NAME
- vm.pci_dev_num
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
As is recommended by UX/DX reviews, the per-VM console virtual UART is now
limited to the following choices:
- Disabled
- a COM port from COM1 to COM4
- PCI based
This patch converts the schema of scenario XMLs to integrate this
recommendation and add logic in the scenario upgrader to migrate data from
old scenario XMLs.
v1 -> v2:
* Update the static allocators and C source transformers according to the
new console vUART config item.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Instead of using a Boolean variable indicating whether a build is for debug
or release, it is more intuitive to specify the build types as "debug" or
"release".
This patch converts the config item RELEASE to BUILD_TYPE which takes
"debug" or "release" as of now.
The generated header and makefile still uses RELEASE, and the command line
option RELEASE=<y or n> is also preserved.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
With a bunch of dramatic improvement to the schema of scenario XML
recently, it is now non-trivial for users of previous releases to migrate
their scenario definitions to the next-gen schema, which will be a
major obstacle when upgrading to the next ACRN release.
In order to ease the upgrade of scenario XML, this patch introduces a
script that takes a scenario XML of previous releases and generates a new
one which satisfies the latest schema. The major data that can be migrated
include:
- Virtual UART and shared memory configurations
- VM types, load_order and guest flags
Other data are preserved as long as they are still needed according to the
schema. The script to print a list that summarizes the data that are
unintendedly discarded during the upgrade, so that users can double check
the results and edit the generated scenario using the configurator.
The upgrader share the same command-line interface of the default value
populator and scenario validator.
More upgrading logic will be added at the same time the schema is changed.
v1 -> v2:
* The upgrader now pretty-prints the upgraded XML.
* Apply the upgrader to the current scenario XMLs in the repo. The
ordering of nodes are adjusted to align with the schema, but no
essential changes are made.
* Set the log level to INFO.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
We plan to add the following attributes to element definitions in the XML
schema:
- acrn:applicable-vms, which specify if an element applies to a
pre-launched VM, the service VM or a post-launched VM
- acrn:views, which specify if an element shall appear in the basic or
advanced tab in the configurator.
In order to reduce the attributes above to existing XML technologies, we
need to create new complex types that lists all config items that applies
to a pre-launched VM, the service VM or a post-launched VM, or that should
be shown in the basic or advanced view. Such types can then be used to
replace the original, all-in-one type during validation or configurator
rendering.
When unspecified, an element always applies under all possible
circumstances.
To realize this slicing mechanism, this patch adds a generic class
implementing the common part of slicing XML schema types and two
specific-purpose slicers according to the applicable VMs or views
attributes.
v2 -> v3:
* Update configdoc.xsl to recognize types in xs:alternative nodes.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Today the scripts that populate default values and validate scenarios have
different command-line interfaces: the former requires an XML schema as
input (which is cumbersome in most cases), while the latter always infer
where the XML schema is (which is inflexible).
This patch unifies the command line options of those scripts as follows:
- The scenario XML is always a required positional argument.
- The output file path (if any) is an optional positional argument.
- The schema XML file is an optional long option. When not specified, the
scripts will always use the one under the misc/config_tools/schema
directory.
Also, this patch makes the validator.py executable, as is done to other
executable scripts in the repo.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
There is an increasing demand of composing different operations around XML
schemas and/or data in different ways for different purpose. Today we
already have:
- Validate XML data, which takes XML schemas and data (board and
scenario) as inputs.
- Fill in missing nodes in XML data with default values, which takes XML
schema and data (scenario only) as inputs.
In the near future we'll extend the operations around XMLs by introducing
XML schema preprocessing and XML data upgrading, adding more possibilities
to construct a larger operation by composing smaller ones.
In order for minimized code repetition and easier composition, this patch
introduces an infrasturcture that abstracts each operation as a pipeline
stage. Each stage defines its own inputs and outputs and can be composed
sequentially as a larger, single operation.
The existing operations listed above, along with XML file loaders, are then
refactored to provide pipeline stages. The main methods are also refined to
complete their tasks by constructing and invoking pipelines.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Today the default value populator will always create a node if it is
required by the schema but not provided in the given XML file. This could
hide issues in a given scenario XML if a node does not have default
values (i.e. require user's inputs) but accepts empty text.
This patch avoids the creation of nodes without a default value so that, at
validation stage, missing of essential data is always reported.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
The "xs:alternative" nodes in XML schema enables specifying different types
for the same node according to the contents of that node. A typical usage
of this construct in the schema of scenario XMLs is to specify different
types for a `vm` node depending on whether it is a pre-launched,
post-launched or service VMs, so that each VM contains only configurations
supported in that kind of VM.
This patch adds support of xs:alternative nodes to the schema transformer
so that default values can be populated appropriately after we add
xs:alternative nodes to the schema.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
PR #7167 removed configuration options that were referenced by
documentation. Remove those references.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
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>
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>
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>
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>
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>
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>
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>