* install all Debian packages from /tmp (not ~/acrn-work)
* remove use of USB stick to copy files between dev and target (use scp)
* fix kernel version numbers (5.15.44 to 5.15.77)
* update parameters for debian_build.sh
* remove display of GRUB menu (ACRN now takes over target and
automatically boots into hypervisor then Service VM
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
When searching for scenario XMLs that are saved under the same directory as
a board XML, debian/rules uses the wildcard `*` which includes other
non-XML files. That causes some non-XML files to be considered as scenario
XMLs as well and will cause build-time errors when the build system
attempts to parse them as XMLs.
Change the wildcard expression to `*.xml` to restrict the found files to be
XML.
Tracked-On: #8344
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
The variables BOARDLIST and SCENARIOLIST serve as filters of XMLs that are
found under the user-given directories, and there is no need to assume any
filter if a user does not specify that explicitly.
Update the default filters to none so that all found XMLs will be used if a
user does not state otherwise.
Tracked-On: #8246
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Remove the common interface for sbuf setup, as it is not accept by
kernel side. Instead, use dedicate setup function for asyncio to init
its sbuf.
Tracked-On: #8209
Signed-off-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Update security advisory for v3.0.2 release.
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The division operator in XPATH is `div`, not `/`. Fix it in an error
message of the assertions.
Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Commit ce6500893 ("board_inspector: use executables found under system
paths") unintendedly changes how acpi.py invokes `rdmsr` and that impacts
the type of the execution results and causes incompatible method calls when
the results are parsed.
Convert the invocation back to shell-style.
Fixes: ce6500893 ("board_inspector: use executables found under system paths")
Tracked-On: #8315
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
* Simplify grub-mkconfig helper script,
* Append Service VM kernel boot parameters to ACRN parameter in
multiboot/multiboot2 line to avoid overriding the configured settings,
* Support GRUB configuration for pre-launched VMs,
* Extend and document the GRUB variables for controlling GRUB boot
menu generation.
Tracked-On: #8274
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
to enable early print output by pci uart, which has mmio address
above 4G, add the early pagetable map for the MMIO range.
we make an assumption that only map it with 2MB page, since platform
with 39bit memory width have no 1G huge page feature and we cannot
get the capacity at runtime, since it is a very early code stage.
v2->v1:
1. add hva2hpa_early
2. add process when *pdpte is not present
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
Reviewed-by: fei1.li <fei1.li@intel.com>
Tracked-On: #6690
The version info is mainly used to tell the user when and where the binary is
compiled and built, this will change the dm version format.
The dm follows the format:
major.minor-stable/unstable-remote_branch-acrn-commit_date-commit_id-dirty
(tag-current_commit_id) build by author date.
Compare to the hv version, which is:
major.minor-stable/unstable-remote_branch-acrn-commit_date-commit_id-dirty
DBG/REL(tag-current_commit_id) scenario@board build by author date.
The dm doesn't contain DBG/REL because it's given in configurator-tool
only for hv. also not contain scenario and board info.
e.g.
with tag:
$acrn-dm -v
DM: 3.1-stable-release_3.1-2022-09-27-11:15:42-7fad37e02-dirty(tag: v3.1)
build by zhangwei@2022-11-16 07:02:35
without tag:
$acrn-dm -v
DM: 3.2-unstable-master-2022-11-16-14:34:49-11f53d849-dirty
build by zhangwei@2022-11-16 06:49:43
Tracked-On: #8303
Signed-off-by: Zhangwei6 <wei6.zhang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Currently we use configurator to generate sample launch scripts and
configuration code, remove old ones and put all generated launch scripts
into generic_board.
Tracked-On: #6690
Signed-off-by: Xie, nanlin <nanlin.xie@intel.com>
Add the new parameter for register ioevent function, let the vhost
vq and viothread vq can share the register ioevent common API.
Tracked-On: #8323
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Reviewed-by: Conghui <conghui.chen@intel.com>
Board inspector does not support multiple PCI segment. Stop running and
throw out the message for user to disable VMD from BIOS setting.
Tracked-On: #8327
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
The version info is mainly used to tell the user when and where the binary is
compiled and built, this will change the hv version format.
The hv follows the format:
major.minor-stable/unstable-remote_branch-acrn-commit_date-commit_id-dirty
DBG/REL(tag-current_commit_id) scenario@board build by author date.
The '(tag-current_commit_id)' is optional, it exits only when there are
tags for current commit.
e.g.
with tag:
ACRN:\>version
HV: 3.1-stable-release_3.1-2022-09-27-11:15:42-7fad37e02-dirty DBG(tag: v3.1)
scenario3.1@my_desk_3.1 build by zhangwei 2022-11-16 07:02:37
without tag:
ACRN:\>version
HV: 3.2-unstable-master-2022-11-16-14:34:49-11f53d849-dirty DBG
scenario3.1@my_desk_3.1 build by zhangwei 2022-11-16 06:49:44
Tracked-On #8303
Signed-off-by: Zhangwei6 <wei6.zhang@intel.com>
Board inspector may throw an error if a usb device is unplugged or
disconnected while extracting usb device information. Print out the
debug message and continue parsing.
Tracked-On: #8325
Signed-off-by: yuchuyang <yu-chu.yang@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Installing python3-acrn-board-inspector should add a separate grub
menu entry (which is also set as default) to ensure the kernel is
parameterized correctly for the use with ACRN board inspector.
So, rebooting after install will ensure the ACRN board inspector
can run within the required environment. Deinstallation completely
removes the this temporyr entry again.
Remark: the required GRUB configuration files are linked to
/var/lib/acrn-board-inspector (handled in maintainer scripts) to keep
Debian packaging from adding them as conffiles, which would not remove
the on 'apt remove' according to
https://www.debian.org/doc/manuals/maint-guide/dother.en.html#conffiles
Tracked-On: #8262
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
The python3-acrn-board-inspector's dependency on python3-tqdm is not detected by
automatically. Add it manually.
Tracked-On: #8262
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
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