Since acrn-tools are not built when creating a release build, there are no
tool binaries to be installed. Generate the required debian/acrn-tools.install
file on the fly whenever a debug build is requested. This keeps this file
empty on a release build avoiding the resulting build errors about missing
files.
Additionally a package specific README.Debian file is added to explain this
behavior. It will be installed according to Debian packaging guidelines
at /usr/share/doc/acrn-tools/README.Debian.
Tracked-On: #8257
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
ignore debuild intermediate files in .gitignore to avoid
these files pollute acrn-hypervisor repo when using debuild
to build acrn.
Tracked-On: #8262
Signed-off-by: szhen11 <shuang.zheng@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Using partial executable paths in the board inspector may cause unintended
results when another executable has the same name and is also detectable in
the search paths.
Introduce a wrapper module (`external_tools`) which locates executables
only under system paths such as /usr/bin and /usr/sbin and converts partial
executable paths to absolute ones before executing them via the subprocess
module. All invocations to `subprocess.run` or `subprocess.Popen`
throughout the board inspector are replaced with `external_tools.run`, with
the only exception being the invocation to the legacy board parser which
already uses an absolute path to the current Python interpreter.
Tracked-On: #8315
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
When one single device being connected after multiple-levels of PCI-to-PCI
bridges, all those bridges may have the same MMIO window. That causes the
current static allocator not to consider that window being occupied because
of how it detects nested MMIO regions.
Remove duplicates in the list of secondary bus MMIO windows to fix that
issue.
Tracked-On: #8312
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
The offline tool use a utility libary and use "common" to named it, this
name conflict with some customer's local library, so we rename it to a
better and clear name.
Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Current code use a invalid parameter to print the vCPU number, this
patch use the length of vCPU list to fix the above issue.
Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
The legacy logic use double IVSHMEM_SIZE to calculate the HV RAM, it can't
match the current code.
This patch use the IVSHMEM_SIZE size only.
Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
update the debian/debian_build.sh script to let the gbp dch to get
the email address for debian/changlog from one of the 3 ways with
priority from high to low: using environment variable 'EMAIL' or
'DEBEMAIL' if existed(this is actually gbp dch required), user.email
in git config if existed(set user.email to environment variable
'EMAIL' or 'DEBEMAIL' for gbp dch), or using a dummy address
"projectacrn@gmail.com".
Tracked-On: #8262
Signed-off-by: szhen11 <shuang.zheng@intel.com>
Generate config_summary.rst when saving scneario XML and launch scripts.
Tracked-On: #8300
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
When building debian packages using one or more work folders generated by
the configurator, the build system will use the name of the work folder as
the scenario name because the configurator always names a scenario XML as
'scenario.xml'. Scenario names are important here because:
1. they are used to name the installed hypervisor binaries and map files,
and the postinst scripts will use those names to fetch the right
binary to put under /boot.
2. when multiple work folders defining different scenarios on the same
board is given, use the basename of the scenario XMLs leads to a name
conflict.
Not following the same scenario name derivation rule in debian/rule will
prevent a proper hypervisor binary to be put under /boot and lead to
boot-time failure. The potential scenario name collisions can also cause
unintended binaries to be installed.
This patch updates debian/rules to follow the same scenario name derivation
rules as the build system is using.
Tracked-On: #8301
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
1. Generate success message when there is no critical error.
2. Generate note when there is error(s).
Tracked-On: #8297
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
generate one line of parameter in launch scipt for
multiple xchi configs in scenario.xml.
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Tracked-On: #6690
Fix the following issues:
1. <gpu> and <displays> elements are added to scenario XML when they are not configured.
2. Virtio GPU components disappears after switching to another tab and switching back to
previous tab.
3. Wrong error message of vertical offset checking.
Improve the error check in virtio_devices.xsd:
1. Every window virtual display need to configure window resolution, horizontal offset
and vertical offset.
2. Any display's elements need to be configured. The existing code
only check the first window resolution, horizontal offset, vertical
offset and monitor id.
Tracked-On: #8292
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
According to section 6.1.1, ACPI Spec 6.4, _ADR of a device object under
PCI/PCIe bus can use a special function number 0xFFFF to refer to all
functions of a certain device. Such objects will have their own nodes in
the board XML, and that causes build-time issues when a static allocator
attempts to get all BDFs occupied under the root bus because 0xFFFF is not
a valid function number (which ranges from 0 to 7).
This patch skips ACPI devices with such addresses when listing existing
BDFs.
Tracked-On: #8293
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
When CPU support MONITOR/MWAIT, OS prefer to use it enter
deeper C-state.
Now ACRN pass through MONITOR/MWAIT to guest.
For vCPUs (ie vCPU A and vCPU B) share a pCPU, if vCPU A uses MWait to enter C state,
vCPU B could run only after the time slice of vCPU A is expired. This time slice of
vCPU A is gone to waste.
For Local APIC pass-through (used for RTVM), the guest pay more attention to
timeliness than power saving.
So this patch hides MONITOR/MWAIT by:
1. Clear vCPUID.05H, vCPUID.01H:ECX.[bit 3] and
MSR_IA32_MISC_ENABLE_MONITOR_ENA to tell the guest VM's vCPU
does not support MONITOR/MAIT.
2. Enable MSR_IA32_MISC_ENABLE_MONITOR_ENA bit for
MSR_IA32_MISC_ENABLE inject 'GP'.
3. Trap instruction 'MONITOR' and 'MWAIT' and inject 'UD'.
4. Clear vCPUID.07H:ECX.[bit 5] to hide 'UMONITOR/UMWAIT'.
5. Clear "enable user wait and pause" VM-execution control, so
UMONITOR/MWAIT causes an 'UD'.
Tracked-On: #8253
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
When launch a User VM own pCPUs, offline Service VM vCPUs which use
the same pCPUs by launch script.
Tracked-On: #8253
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Add "exclusively owns physical CPUs" checkbox to pre-launched VMs
and post-launched VMs. RTVM will not display this checkbox.
If this checkbox is set, the VM will use all the pCPUs assigned to
it alone.
Tracked-On: #8253
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Switch tag in order to trigger the component re-rendering after importing
different board XML.
Tracked-On: #8288
Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Verified that the newly released RTD theme is OK to use with the doc build process,
so update the requirements.txt with that and tweak the acceptable docutils versions.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Exclude "GUEST_FLAG_PMU_PASSTHROUGH" from DM_OWNED_GUEST_FLAG_MASK
in case device model rewrite the value in release mode, reserve it
in debug mode.
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
Tracked-On:#6690
To avoid assertions in devicemodel, remove all the assert() in vga.c,
use print error message to check errors.
All the behavior of registers follow this spec:
https://wiki.osdev.org/VGA_Hardware#Graphics_Mode
Tracked-On: #8125
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Huang, Yonghua <yonghua.huang@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
To be able to to conditionally add a launch script directory for
acrn-hypervisor package, the debian/acrn-hypervisor.install file must be
created dynamically. If there are only configurations (e.g. partitioned
scenarios) that do not need any launch scripts, we have to omit the
launch script directory entry in debian/acrn-hypervisor.install.
Tracked-On: #8263
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
$ debian/debian_build.sh -h
Usage: debian/debian_build.sh [--board_list ACRN_BOARDLIST] [--scenario_list ACRN_SCENARIOLIST] [--config_path CONFIGDIRS] [--release n|y] [acrn | board_inspector | clean]
Optional arguments:
-h, --help show this help message and exit
-b, --board_list list the boards to build, seperated by blank; build all scanned boards in the config path if specified as ""; build the default boards in debian rules if not specified
-s, --scenario_list list the scenarios to build, seperated by blank; build all scanned scenarios in the config path if specified as ""; build the default scenarios in debian rules if not specified
-c, --config_path specify the config path for the board and scenario configuration files, default use misc/config_tools/data if not specified
-r, --release build debug version with n, release version with y; default defined in debian rules if not specified
acrn|board_inspector|clean specify the build target, default value is acrn if not specified
Examples:
debian/debian_build.sh
debian/debian_build.sh -b nuc11tnbi5 -s shared
debian/debian_build.sh -b "nuc11tnbi5 tgl-vecow-spc-7100-Corei7" -s "shared hybrid" -c misc/config_tools/data -r y
debian/debian_build.sh -b "" -s shared
debian/debian_build.sh board_inspector
Tracked-On: #8246
Signed-off-by: szhen11 <shuang.zheng@intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
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
The schema of scenario XMLs uses both named and anonymous complex types,
but the configdoc.xsl today only works for named complex types. That causes
improper rendering of config items related to virtio devices (whose schema
uses anonymous types) as well as wrong applicable VM icons which states
that virtio devices apply to not only post-launched VMs but also
pre-launched and service VM, which does not make sense.
This patch improves configdoc.xsl by adding support of anonymous complex
types so that they are walked through in the same way as named ones.
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
The current code would write 'BAR address & size_maks' into PCIe virtual
BAR before updating the virtual BAR's base address when guest writing a
PCIe device's BAR. If the size of a PCIe device's BAR is larger than 4G,
the low 32 bits size_mask for this 64 bits BAR is zero. When ACRN updating
the virtual BAR's base address, the low 32 bits sizing information would
be lost.
This patch saves whether a BAR writing is sizing or not before updating the
virtual BAR's base address.
Tracked-On: #8267
Signed-off-by: Fei Li <fei1.li@intel.com>
Custom attributes in the XML schema, such as `applicable-vms` and `views`,
are designed to recursively inherit those of the parent. Thus, the
effective attribute of an element should be derived by its lowest ancestor
that has that attribute explicitly defined. Looking up only one level would
not be sufficient.
This patch updates the `configdoc.xsl` to derive the effective attributes
properly so that icons in the generated doc properly reflects what is
specified in the schema. Addresses ACRN-7347
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The targets "clean" and "distclean" are special as they do not need BOARD
or SCENARIO from users. This patch stops the guesswork of BOARD and
SCENARIO if any of those two targets are specified.
It is assumed that "clean" or "distclean" is not invoked with other targets
at the same time.
Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
In the current config.mk board and scenario XMLs are only copied to the
build directory when they do not exist. That prevents users from using XML
files they have edited, probably to fix previously reported validation
errors, for a rebuild unless the former build directory is totally removed.
This patch adds the user-given paths to XML files (if they exist) as
dependencies of the copied files in the build directory, so that users can
now provide new board and/or scenario XMLs to an existing build to
automatically trigger a complete rebuild.
Building without explicitly specifying BOARD and SCENARIO is still
supported if a build directory already exists. In that case the copied
board and scenario XMLs will not be modified.
Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
ACRN config tools generate source files, scripts and binaries based on
users' inputs in the configurations files, i.e., board and scenario
XMLs. Those generation activities all assume that users' inputs are
properly validated, so that all assumptions they have on such inputs are
hold.
Unfortunately, not all dependencies on validated user inputs are explicitly
stated in the Makefiles today. That will cause random error messages
(typically a Python stack trace) to be printed along with validation errors
when an invalid scenario XML is given, and such messages confuse users
about the root causes of the failure.
This patch decouples scenario validation from genconf.sh and make that step
as a separate target that depends on the board and scenario XMLs. One
timestamp file is generated only when the validation succeeds so that
targets requiring validated XMLs can refer that file in its dependency list
to make it explicit.
Dependencies of the following targets are also updated accordingly:
* $(HV_ALLOCATION_XML), which is the allocation XML including static
allocation results, now also depends on validated XMLs.
* $(HV_CONFIG_TIMESTAMP), which records when the config source files are
generated, now also depends on validated XMLs.
* $(SERIAL_CONF), which is the serial conf for the service VM, depends on
the allocation XML.
By the way, the missing dependency on HV_CONFIG_DIR for touching
HV_DIFFCONFIG_LIST is added to fix the "file not found" issue.
Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
In the top-level Makefile, the target "hypervisor" depends on "hvdefconfig"
because, at the time the latter is introduced, building without specifying
BOARD or SCENARIO is supported by using a pair of default board and
scenario XMLs.
This is no longer the case today, as BOARD and SCENARIO are now mandatory
command line options. As a result, that dependency is no longer necessary,
and this patch just removes that.
Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
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>
The target "default" in hypervisor/Makefile is just an alias of the target
"all" in order to make "all" being the default goal. This patch replaces
that duplicate target and specifies the default goal by defining the
variable .DEFAULT_GOAL instead.
Tracked-On: #8259
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
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>
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>
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>
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>
Now ACRN would traps MSI-X Table Structure access and does MSI-X interrupt
remapping for pass-thru PCIe devices. ACRN does this trap by unmmapping the
address ranges where the MSI-X Table Structure locates in granularity of 4K
pages. So there may have other registers (non-MSI-X structures) in these
trapped pages
However, the guest may access these registers (non-MSI-X structures) in these
trapped pages, which needs to be forwarded to the physical device. This patch
forwards the access to real hardware for pass-thru PCIe devices.
Tracked-On: #8255
Signed-off-by: Fei Li <fei1.li@intel.com>