Commit Graph

8049 Commits

Author SHA1 Message Date
Kunhui-Li 9c2d0f8858 config_tools: replace RstCloth library with class.
Currently, Configurator load fail because it needs to download
RstCloth related packages. This patch defines Doc class to replace
RstCloth library to fix this issue.

Tracked-On: #8395
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2023-05-11 15:25:44 +08:00
wenlingz e28d6fbfdf update CODEOWNERS
Tracked-On:#5581
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2023-05-09 02:10:24 +08:00
dependabot[bot] b2aecb2731 build(deps): bump openssl
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.38 to 0.10.51.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.38...openssl-v0.10.51)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-08 11:12:55 +08:00
Kunhui-Li b1ad671736 config_tools: capture the IOError exception
If no TURBO_RATIO_LIMIT and TURBO_ACTIVATION_RATIO MSRs info
on target, board inspector will crash because of the IOError exception.

This patch captures the IOError exception to handle this error.

Tracked-On: #8380
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2023-05-04 14:35:29 +08:00
Kunhui-Li 8aa716f88e config_tools: filter non-ascii characters in iomem infomation
If we use 5.15 kernel on rpl-p platform, some iomem info dumped with
non-ascii characters, then tool will raise a decode error.

So this patch filters non-ascii characters to handle this error.

Tracked-On: #8388
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2023-04-25 18:41:25 +08:00
Chenli Wei c9e5fd1469 misc: fix the summary issue after update board xml
The new board xml have add a "module" node under the "processors/die"
which has cause an issue when we run the summary, this patch  use "//"
to select all "cpu_id" under the "processors".

Tracked-On: #8385
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
2023-04-24 15:43:09 +08:00
Junjie Mao de0a765010 config_tools: adapt to elementpath >= 4.0.0
Starting from elementpath 4.0.0, the XPath2Parser class no longer has a
SYMBOLS member and completeness checking based on that are removed as
well. This patch updates the elementpath_overlay in the config tools to fix
the compilation issue when using recent elementpath versions.

Tracked-On: #8368
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2023-04-24 11:46:56 +08:00
Jiaqing Zhao d4fa35ad5b misc: life_mngr: fix use-after-free in uart channel
LIST_FOREACH() doesn't allow var to be removed or freed within the
loop, but c_dev is freed inside the loop here. gcc 12 also reports
error on it. This patch uses list_foreach_safe() macro instead for
freeing var within the loop safely.

Tracked-On: #8382
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2023-04-21 23:30:57 +08:00
Qiang Zhang fcb8e9bb2d ptirq: Fix INTx assignment for Post-launched VM
When assigning a physical interrupt to a Post-launched VM, if it has
been assigned to ServiceVM, we should remove that mapping first to reset
ioapic pin state and rte, and build new mapping for the Post-launched
VM.

Tracked-On: #8370
Signed-off-by: Qiang Zhang <qiang4.zhang@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2023-04-13 12:24:57 +08:00
Qiang Zhang bf9341844a ptirq: Fix ptirq hash tables
ptirq_remapping_info records which physical interrupt is mapped to
the virtual interrupt in a VM. As we need to knonw whether a physical
sid has been mapped to a VM and whether a virtual sid in a VM has been
used, there should be two hash tables to link and iterate
ptirq_remapping_info:
- One is used to lookup from physical sid, linking phys_link.
- The other is used to lookup from virtual sid in a VM, linking virt_link

Without this patch, phys_link or virt_link from different
ptirq_remapping_info was linked by one hash list head if they got the
same hash value, as shown in following diagram.
When looking for a ptirq_remapping_info from physical sid, the original
code took all hash list node as phys_link and failed to get
ptirq_remapping_info linked with virt_link and later references
to its members are wrong.
The same problem also occurred when looking for a ptirq_remapping_info
from virtual sid and vm.

 ---------- <- hash table
|hlist_head|                                --actual ptirq_remapping_info address
 ----------                      --------- /    --used as ptirq_remapping_info
|    ...   |                    |phys_link| ___/
 ----------      ---------       --------- /     ---------
|hlist_head| -> |phys_link| <-> |virt_link| <-> |phys_link|
 ----------      ---------       ---------       ---------
|    ...   |    |virt_link|     | other   |     |virt_link|
 ----------      ---------      | members |      ---------
                | other   |      ---------      | other   |
                | members |                     | members |
                 ---------                       ---------

Tracked-On: #8370
Signed-off-by: Qiang Zhang <qiang4.zhang@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2023-04-13 12:24:57 +08:00
dependabot[bot] c8bf91c788 build(deps): bump tokio
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.24.1 to 1.25.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.24.1...tokio-1.25.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 18:38:55 +08:00
dependabot[bot] 5b89fb0bae build(deps): bump bumpalo
Bumps [bumpalo](https://github.com/fitzgen/bumpalo) from 3.9.1 to 3.12.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases)
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.9.1...3.12.0)

---
updated-dependencies:
- dependency-name: bumpalo
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-07 13:49:51 +08:00
David B. Kinder f8f1d22645 doc: fix missing numbered-step icon
Sphinx version 5 generates &lt;section&gt; instead of &lt;div&gt; for
section headings.  This throws off the custom CSS style for numbered
steps so the number icon wasn't showing up.  Tweak the custom CSS to
look for both &lt;section&gt; and &lt;div&gt; with class=numbered-step
to handle Sphinx 4 and 5-generated content.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2023-01-19 17:09:12 -08:00
Min Yang 672f55b37c debian: modify kernel version display to GRUB menuentry
Tracked-On:#8359
Signed-off-by: Min Yang <minx.yang@intel.com>
2023-01-11 17:38:38 +08:00
Min Yang d08b66e74f debian: add kernel version to GRUB menuentry
1. add kernel version to menuentry "Ubuntu-ACRN Board Inspector"
2. add kernel version and acrn version to menuentry "Ubuntu with ACRN hypervisor"

Tracked-On:#8359
Signed-off-by: Min Yang <minx.yang@intel.com>
2023-01-11 17:38:38 +08:00
dependabot[bot] 90c9f99a8d build(deps): bump tokio
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.17.0 to 1.24.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.17.0...tokio-1.24.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 16:19:18 +08:00
Min Yang c7907f244a doc: add "Linux" and "ACRN" to grub display in GSG
Add "Linux" before kernel version, and "ACRN" before acrn version.

Signed-off-by: Min Yang <minx.yang@intel.com>
2022-12-22 15:39:20 -08:00
Min Yang 1880ce82b3 doc: remove building the ACRN kernel for Service VM
delete building the ACRN kernel for the Service VM,
add some mention when building ACRN hypervisor,
and modify GRUB menuentry choice name.

Signed-off-by: Min Yang <minx.yang@intel.com>
2022-12-12 11:09:44 -08:00
Min Yang da92fee03a doc: update sample-app version &command to match release_3.2
1. update hypervisor and kernel version to release_3.2
2. modify debian package (of ACRN hypervisor and tools) build command
3. delete iasl command lines (substitute: acpica-tools generate iasl in GSG)
4. remove use of USB stick to copy files from development computer to
   target (only use scp)
5. remove grub menu after reboot (it will boot automatically.)

Signed-off-by: Min Yang <minx.yang@intel.com>
2022-12-12 11:09:44 -08:00
Min Yang 9d2e72f5ea doc: add kernel version to grub menuentry in GSG
1. add kernen version to menuentry "Ubuntu-ACRN Board Inspector"
2. add kernel version and acrn version to menuentry
   "Ubuntu with ACRN hypervisor"

Please refer to #8357(master) and #8358(release_3.2) for code change.

Signed-off-by: Min Yang <minx.yang@intel.com>
2022-12-12 11:09:16 -08:00
Min Yang 1961718a6e doc: update grub menu set when reboot into ACRN in GSG
1. modify GRUB file /etc/default/grub
2. update GRUB menu after rebooting
3. update the UOS kernel

Signed-off-by: Min Yang <minx.yang@intel.com>
2022-12-12 11:09:16 -08:00
David B. Kinder e9b4f5bff1 Update sample app scripts for Ubuntu 22.04
The switch to Ubuntu 22.04 for ACRN v3.2 requires a few changes to the
sample application scripts:

- user _apt cannot access debian packages in user directories, so copy
  them to /tmp to install
- HMI-VM image size needs to be bigger (running out of space during
  image update)

Tracked-On: #8352

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-12-01 17:00:11 +08:00
Yuanyua Zhao 07bf31da1f config_tools: set 'own_pcpu' of RTVM
For STANDARD_VM 'own_pcpu' default value is 'n'. But RTVM always own pCPUs.
So check 'own_pcpu' of RTVM and make sure it's set to 'y'.

Tracked-On: #8253
Signed-off-by: Yuanyua Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-11-30 16:35:02 +08:00
David B. Kinder eca702ecf8 doc: update GSG with v3.2 changes
* 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>
2022-11-29 10:26:41 -08:00
Min Yang 03236c1de6 doc: update SGS and Sample App to match release 3.2
1. update grub item in SGS
2. update acrn kernel version
3. update file names

Signed-off-by: Min Yang <minx.yang@intel.com>
2022-11-29 09:27:19 -08:00
Junjie Mao 494ec8064a debian/rules: search for XML files only
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>
2022-11-29 18:05:42 +08:00
Junjie Mao bdb525aae3 debian/rules: change default BOARDLIST and SCENARIOLIST to empty
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>
2022-11-29 17:32:27 +08:00
Conghui a715a3222b asyncio: refine the setup ioctl
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>
2022-11-25 10:43:34 +08:00
David B. Kinder 23b36bae45 doc: update GSG to reflect release 3.2 changes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-11-24 12:00:56 -08:00
Min Yang 6634ab3ca1 docs: modify getting-started.rst
1.modify the board inspector name
2.add sudo before reboot (user: acrn)

Signed-off-by: Min Yang <minx.yang@intel.com>
2022-11-23 09:46:57 -08:00
David B. Kinder e41d6c1c9e doc: add 3.0.2 release notes to master branch
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-11-22 10:31:38 -08:00
Yonghua Huang 37750a5a48 doc: update asa.rst for v3.0.2 release
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>
2022-11-22 09:26:35 -08:00
Junjie Mao f4f828f762 config_tools/schema: fix division operator in error messages
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>
2022-11-22 16:06:48 +08:00
Junjie Mao 4c54dae5cf board_inspector: fix the invocation to rdmsr
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>
2022-11-22 15:32:24 +08:00
David B. Kinder 2ae578eaaf doc: update GSG with corrections
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-11-21 23:00:39 -08:00
szhen11 f8ec216df7 doc: update GSG to use debuild to build ACRN packages
Signed-off-by: szhen11 <shuang.zheng@intel.com>
2022-11-21 22:30:29 -08:00
Helmut Buchsbaum f8ec83e628 debian: grub-acrn: Rework to provide configuration interface for GRUB
* 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>
2022-11-22 10:33:58 +08:00
hangliu1 bb2118d98b hv: support for pci uart with high mmio
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
2022-11-21 16:50:05 +08:00
Zhangwei6 b17b5992c8 dm: change the version format
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>
2022-11-21 13:23:28 +08:00
Xie, nanlin a58d2ebddc misc: Update sample launch scripts into generic_board folder.
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>
2022-11-21 11:51:33 +08:00
Liu Long 0caf1ac0de ACRN:DM: Fix the vhost register kick fd issue.
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>
2022-11-21 11:18:23 +08:00
yuchuyang 796fb2971c config-tools: board inspector exits if the VMD is configured
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>
2022-11-21 10:03:39 +08:00
Zhangwei6 38f910e4fb hv: change the version format
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>
2022-11-21 09:45:26 +08:00
yuchuyang 9d8ddeabdc config-tools: board inspector does not exit if a usb device is unplugged
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>
2022-11-18 19:22:44 +08:00
Helmut Buchsbaum b02f991423 debian: Add grub config helpers for python3-acrn-board-inspector
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>
2022-11-18 18:52:30 +08:00
Helmut Buchsbaum 3eacae5e50 debian/control: Add missing dependency for python3-acrn-board-inspector
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>
2022-11-18 18:52:30 +08:00
dependabot[bot] 43aec3d2a3 build(deps-dev): bump vite in /misc/config_tools/configurator
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.6 to 2.9.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.9.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 16:57:48 +08:00
David B. Kinder 9ac6c31c3b doc: add tutorial for enabling multiple displays
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-11-16 07:43:59 -08:00
Helmut Buchsbaum 3a1eb26de0 debian/rules: Cleanup egg-info directory of acrn-board-inspector
Tracked-On: #8257
Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
2022-11-16 16:36:20 +08:00
Helmut Buchsbaum 13937162e1 debian: Fix release package build
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>
2022-11-16 16:36:20 +08:00