Since PR #6943 has landed, the `CONFIG_IOMMU_BUS_NUM` has been renamed
to `ACFG_MAX_PCI_BUS_NUM`, this patch removes the obsolete code about
`CONFIG_IOMMU_BUS_NUM`.
v1-->v2:
Update the upgrader.py to add a description of this obsoleted item.
Tracked-On: #6942
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
If user add the specific mac address (eg: mac=00:16:3E:77:A9:41)
in launch script, we will get the device name with the specified mac address.
This is unexpected. This patch updates the parser to fix the issue.
v1-->v2:
Update the parser with regex.
Tracked-On: #7197
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Since PR #7185 has removed the assume of virtio-net device name,
we also remove it in the launch script generation logic.
Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Now, the DM assumes the device name entered by user is dependent on
the type.
For example, the device of tap type is named tap_TAAG, this patch
remove the above assumption.
User could set any name, no matter the code of DM or actually created,
it is represented by user input.
Tracked-On: #6690
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Signed-off-by: Chenli Wei<chenli.wei@linux.intel.com>
Because there is no SDC scenario in the generic template,
We remove the SDC specific scenario
Tracked-On: #6701
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
DM dynamic param '-A' has been removed.
For compability, add a warning for `-A` instead of terminate the launch
process.
Tracked-On:#6690
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Remove device name requirement for “tap” and "vmnet", change the
parameter format like:
"-s 4,virtio-net,tap/vmnet=dev_name".
change mac_seed to virtio-net sub-parameter
As a parameter of acrn-dm,the mac_seed is only used for virtio-net.
So this patch change it to the sub-parameter of virtio-net.
The final format is:
-s 4,virtio-net,tap/vmnet=dev_name,mac_seed=XXXX
Tracked-On: #6690
Signed-off-by: Chenli Wei chenli.wei@linux.intel.com
Remove the proof-of-concept shell script that post-processes the
generated HTML to add the git date when the corresponding .rst file as
the last modified date, augmenting the existing published date.
Instead, use a custom last_updated.py Sphinx extension that's integrated
into the Sphinx build itself. Remove the old fix-git-modified-date.sh
script and calls to it.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The next-generation ACRN configurator will embed a Python interpreter built
in WebAssembly (WASM) for executing Python scripts for manipulating
scenario schemas and validating user data. It is quite tedious to
separately import multiple modules there due to the restriction of that
Python environment. The recommended approach is to package those
modules (e.g. as a *.wic file) so that all modules can be imported in one
shot.
This patch adds the files needed to package the scripts. The package is
solely used for the configurator to import and not intended to be used by
end users for any purpose.
v1 -> v2:
* Fix the license header of __init__.py
* Move patterns of ignored files to the top-level .gitignore
Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
The Service VM needs a 'serial.conf' file to recognize and use
non-standard vUART with the 'setserial' package.
The logic of create serial.conf should update after we move vUART
connection to global and use endpoint to replace the target VM id.
This patch select the new vUART connection and check whether one of the
endpoint is Service VM, if yes, then check the io_port and record it
when the vUART is non-standard.
All these non-standard vUART will be written to the serial.conf.
Tracked-On: #6690
Reviewed-by: Junjie Mao junjie.mao@intel.com
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
This patch adds a (meta) XML schema of those XML schema files specifying
the validation rules (using xs:assert constructs). This provide integrators
with a mechanism to confirm the well-formedness of those rules, especially
the customized annotations for advanced error reporting.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
In order for more effective and specific error reporting, this patch
enhanced the XML assertion validation mechanism by:
- Enhancing the elementpath library at runtime to capture of quantified
variables that causes an assertion to fail, which can be used as a
counter example of the rule.
- Allowing error messages (as xs:documentation in the XML schema)
embedding XPath (up to 2.0) which will be evaluated against the counter
example to provide more specific information about the error.
- Adding to assertions a mandatory attribute which specifies the context
node(s) of an error using XPath. These nodes can be further used in the
configurator to attach the errors to the widgets where users can fix
them.
v1 -> v2:
* Logging the validation errors according to their defined severity
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Now we have transitioned to use XML schema to record all data validation
rules against board and scenario XMLs. While most checks originally in the
Python scripts are about the syntax of the XML files and thus naturally
covered by the XML schemas, there are still a few that conduct cross-check
on data consistency.
This patch migrates those checks into XML schema as assertions.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
The "MMIO resources" section of a VM definition may contain different nodes
depending on the VM load order, but the schema slicer cannot convert the
complex type specifying this section because the schema requires those
nodes to be a strictly-ordered sequence (by xs:sequence), not a set (by
xs:all).
As there is no requirement on this strict ordering, this patch converts
that complex type to be an unordered set instead.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Update the top-level LICENSE file that provides the full text of the BSD-3
Clause license that this project uses. Two updates were made to it:
* Update the year to include 2022
* Removed an extra line: "All rights reserved"
The text matches exactly the reference found here: https://opensource.org/licenses/BSD-3-Clause
Tracked-On: #5647
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
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>