Commit Graph

7348 Commits

Author SHA1 Message Date
Reyes, Amy 7f2175cdce doc: Fix links
- Fix broken software.intel.com links that moved to intel.com domain

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-04-18 17:16:15 -07:00
Sun Peng df7826245e doc: virtio-gpu parameters of acrn-dm
Update parameters of virtio-gpu in acrn-dm-parameters.rst

Tracked-On: #7210
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
2022-04-18 09:55:03 -07:00
hangliu1 5d938e751b config tool: update schema
Update "Borrowed Virtual Time" scheduler description
Update "RELOC" and "MULTIBOOT2" parameter name
Update xml

Tracked-On: #7297
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-18 19:29:51 +08:00
Zhou, Wu 32cb5954f2 hv: refine the hard-coded GPA SSRAM area size
Using the SSRAM area size extracted by config_tools, the patch changes
the hard-coded GPA SSRAM area size to its actual size, so that
pre-launched VMs can support large(>8MB) SSRAM area.

When booting service VM, the SSRAM area has to be removed from Service
VM's mem space, because they are passed-through to the pre-rt VM. The
code was bugged since it was using the SSRAM area's GPA in the pre-rt
VM. Changed it to GPA in Service VM.

Tracked-On: #7212

Acked-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-04-18 16:47:23 +08:00
Zhou, Wu 423312881d config-tools: extract the SSRAM area size
The GPA SSRAM area size in pre-launched VMs was hard-coded to 8MB.

Since this area is mapped from host SSRAM area, it will cause compile
problem when host's SSRAM area is larger than 8MB.

To solve this issue, we have to calculate SSRAM area's size in
gpa.py, and generate a macro PRE_RTVM_SW_SRAM_MAX_SIZE for HV
to use.

PRE_RTVM_SW_SRAM_START_GPA/END_GPA can be calculated by end/size
in HV, so they are removed.

When SSRAM is not configured in the system, PRE_RTVM_SW_SRAM_MAX_SIZE
is set to 0.

Crl_bin is not needed in guest. So it's size is removed in bin_gen.py.

Tracked-On: #7212

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
2022-04-18 16:47:23 +08:00
zihengL1 5011b9396d packaging: error while loading shared libraries: libSDL2-2.0.so.0
Added the "libsdl2-dev" dependency in file
"misc/packaging/gen_acrn_deb.py"

Tracked-On: projectacrn#7291
Signed-off-by: zihengL1 <ziheng.li@intel.com>
2022-04-18 16:17:30 +08:00
Tw 3c384a489c hv: support CAT on hybrid platform
On hybrid platform(e.g. ADL), there may be multiple instances of same level caches for different type of processors,
The current design only supports one global `rdt_info` for each RDT resource type.
In order to support hybrid platform, this patch introduce `rdt_ins` to represents the "instance".
Also, the number of `rdt_info` is dynamically generated by config-tool to match with physical board.

Tracked-On: projectacrn#6690
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2022-04-18 15:33:11 +08:00
Tw 19da21c898 hv: remove RDT information detection
As RDT related information will be offered by config-tool dynamically,
and HV is just a consumer of that. So there's no need to do this detection
at startup anymore.

Tracked-On: projectacrn#6690
Signed-off-by: Tw <wei.tan@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2022-04-18 15:33:11 +08:00
Junjie Mao 46fab9e8a0 board_inspector: extract PF and VF info
This patch adds logic to the extractors to fetch the following information.

  1. All the details of an SR-IOV capability, which are reported in the
     SR-IOV extended capability structure.

  2. Correctly report the vendor ID, device ID and BAR addresses of VFs.

  3. Refer each VF back to the corresponding PF. Use XPATH to search for
     all the VFs enabled by a PF.

Tracked-On: #7301
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-04-18 14:58:58 +08:00
Junjie Mao 93ccc0f473 board_inspector: parse SR-IOV capability structure properly
This patch adds the logic needed to fully parse an SR-IOV extended
capability structure. Such information will later be used to extract all
information about physical and virtual functions.

Tracked-On: #7301
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-04-18 14:58:58 +08:00
Junjie Mao 0a77891f1c board_inspector: maintain a mapping from cap names to cap struct
In order to ease the access of certain capability structure of a PCI config
space, this patch changes the class PCIConfigSpace to maintain a
_caps_as_dict dictionary that maps capability names (as specified in the
caps.py and extcaps.py) to the actual capability structures.

Tracked-On: #7301
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-04-18 14:58:58 +08:00
Conghui 844c6e0bbc remove repetitive erasing for guest memory
The guest memory is allocated through hugetlb. Huge page fault is
triggered by writing a byte to the starting address for each huge page.
In hugetlb_fault(), The physical pages are allocated and *clear*.

So no need to erasing the memory again after hugetlb setup. This will
bring about 130ms (changes with platform) latency for each 1G memory.

Notice: this means we depends on kernel to erase the memory in huge page
fault!

Tracked-On: #7298
Signed-off-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-04-18 14:07:54 +08:00
hangliu1 2d0089f06b config tool: update cpu affinity check algorithm
pcpu in pre-launched RTVM cannot share with other VM

Tracked-On: #7287
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-18 13:41:37 +08:00
Kunhui-Li e56c0372f0 config_tools: update the upgrader.py script for virtio devices
We have redesigned Virtio devices, so this patch updates
the upgrader.py script for them.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-04-15 14:20:11 +08:00
Kunhui-Li 2ce914428c config_tools: refine virtio in launch script
1. for virtio console, reference to the document
https://projectacrn.github.io/latest/developer-guides/hld/virtio-console.html,
the generated launch script will look like this:
`virtio-console,[@]stdio|tty|pty|file:portname[=portpath]\
[,[@]stdio|tty|pty|file:portname[=portpath][:socket_type]]`
  *receding with @ marks the port as a console port,
   otherwise it is a normal virtio-serial port
  *The portpath can be omitted when backend is stdio or pty.
2. for virtio input, the generated launch script as below.
`<name>:<phys>,id=<anyString>`
The launch script will automatically find the specific /dev/input/eventX
according to the event name and phys got from board.xml.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-04-15 14:20:11 +08:00
Kunhui-Li 76dc2b3a5e config_tools: refine Virtio devices in the schema
We have redesigned Virtio and UI for user, so this patch updates the schema
for the new design.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-04-15 14:20:11 +08:00
hangliu1 cb5d245d9e config tool: generate HV land ivshmem parameter
add support for HV land ivshmem prefix in launch script

Tracked-On: #7279
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-14 10:02:46 +08:00
Reyes, Amy 9ef08d6021 doc: Remove outdated tutorials
- Remove SGX tutorial, partitioned mode GSG, and Trusty reference

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-04-13 14:20:23 -07:00
hangliu1 108424180d deb-pkg: add OVMF_debug.fd in acrn deb
add OVMF_debug.fd in acrn deb

Tracked-On: #7272
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-13 14:34:25 +08:00
hangliu1 5c3e7a29ee config tool/doc:update SCHED_IORR in schema
hide SCHED_IORR and KERNEL_RAWIMAGE in schema
and update SCHED_IORR in doc

Tracked-On: #7256
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-13 13:35:52 +08:00
hangliu1 1157d1d41c config tool: update virtio block setting
add support for more than one virtio block setting
for specific vm

Tracked-On: #7277
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-13 11:13:02 +08:00
hangliu1 0e4a94f9dd config tool: hide PTM in schema
change acrn:view attribute to ""

Tracked-On: #7261
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-12 13:55:20 +08:00
hangliu1 f656ef0abc config tool: Fix service vm cpu affinity issue
default value of minOccurs is "1", which will trigger problem
when user leave pcpu_id blank while preserve cpu_affinity in
service VM.

Tracked-On: #7267
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-12 11:34:56 +08:00
hangliu1 7bf96c5a97 config tool: Fix combined cpu_affinity warning
Service vm could have the combination of big and
little core cpu_affinity setting, fix the assert.

Tracked-On: #7270
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-12 10:05:27 +08:00
Liu Long e347320787 ACRN:DM: Add pci msi per-vector masking capable
Add msi per-vector masking capable and emulate msi mask
pending mechanism in DM.

Tracked-On: #7265
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-04-11 13:50:21 +08:00
Sun Peng c61d41da27 dm: Update license info of types.h
Add license info to devicemodel/include/types.h

Tracked-On: #7248
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
2022-04-08 13:54:47 +08:00
Sun Peng bfde6182d2 dm: virtio-gpu: update copyright and license
Add license information to virtio_gpu.c
Fix some grammar issues.

Tracked-On: #7241
Signed-off-by: Sun Peng <peng.p.sun@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2022-04-08 13:54:47 +08:00
David B. Kinder cd7448c21a doc: fix hardware.rst line endings
Use Linux line endings

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-07 12:59:39 -07:00
Fei Li 59e27ce49e mise: life_mngr: fix some minor bugs
1. enlarge receive Service VM message time to 10s. Now in some extreme
environments, Service VM will takes more than 1s to ACK the User VM's
requirements.
2. fix a bug to calculate string pointer size.

Tracked-On: #7215
Signed-off-by: Fei Li <fei1.li@intel.com>
2022-04-06 18:15:06 +08:00
hangliu1 310120092e config tool: service vm parameter display
Fix it in schema by adding attribute acrn:applicable-vms

Tracked-On:#7262

Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-06 15:40:44 +08:00
Geoffroy Van Cutsem 8b16be9185 Remove "All rights reserved" string headers
Many of the license and Intel copyright headers include the "All rights
reserved" string. It is not relevant in the context of the BSD-3-Clause
license that the code is released under. This patch removes those strings
throughout the code (hypervisor, devicemodel and misc).

Tracked-On: #7254
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2022-04-06 13:21:02 +08:00
Weiyi Feng ac9824cd54 configurator: fix can't load scenario without pci_devs issue
fix can't load scenario without pci_devs issue

Tracked-On: #7246
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-06 11:17:18 +08:00
Kunhui-Li 080335bbe7 config_tools: fix the issue that fail to read XSD file
fix the path issue that fail to read XSD file.

Tracked-On: #6689
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-04-06 10:31:55 +08:00
David B. Kinder faae669130 doc: properly handle last_updated info for new docs
Update the last_updated extension to correctly handle when new docs are
added and aren't yet commited into git vs. when the list of git folders
isn't correct. Previous PR #7251 incorrectly handled these as the same.

Tracked-On: #7249

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-04 16:52:29 -07:00
David B. Kinder 8b0d1e45b9 doc: reference old release notes in archived release docs
Instead of trying to maintain the release notes for old releases in the
current release, reference them in a previous archive.  This eliminates
the need to fix doc build errors by editing old release notes that
reference material that no longer exists in the newer release.

We use the intersphinx extension to support references to
Sphinx-generated content from other projects.  In our case, we're
referencing the archived version of v2.7 documents that was the last
release to generate release notes for all previous releases. This import
is done in conf.py.

(Alternatively we could reference the release notes for a release in
that specific release's archive, but that means fetchind the intersphinx
inventory file (objects.inv) for every release, and seems like
overkill.)

This modification still allows putting multiple release notes in the
doc/release_notes folder and they'll show up in the release notes index
as they have in the past.  Update the separate "archived" release notes
section manually as needed.

Also, adds a draft of the v3.0 release notes to verify the new release
notes index page layout.

Fixes: #7171

Tracked-On: #7171

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-04 08:37:43 -07:00
David B. Kinder 0494017f89 doc: handle last updated footer for new document
If a new document is added, the CI system fails because the new document
hasn't been checked into the branch yet so the last_updated.py script
complains with an error.  Change to use the last_published date in this
situation.

Tracked-On: #7249

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-03 13:45:46 -07:00
David B. Kinder 487961ace6 doc: fix Makefile to report errors if exception raised
We use a post-processor to scan the output log from Sphinx to remove
known errors and warnings before deciding if the Sphinx build was
successful.  If an exception happened during the Sphinx build, (see
about the error would appear.  Update the Makefile to not stop on errors
for the Sphinx build. The post-processor will stop the make by returning
an error code if it finds unexpected errors in the log.

Tracked-On: #7249

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-02 14:03:46 -07:00
David B. Kinder ca9913f34a doc: fix exception error in last_modified processing
When I added a new document that wasn't checked into GitHub yet, the doc
build failed with an unhanded exception:

    Extension error (last_updated):
    (exception: time data '' does not match format '%Y-%m-%d')

Problem is the git query looking up the last commit date for a file
returns an empty string for the date if the file exists but it's not in
the git repo (yet). The subsequent call to strptime raises an exception if passed
an empty string.  This patch handles the exception.

Tracked-On: #7249

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-02 14:01:44 -07:00
Weiyi Feng 3d8fa80949 configurator: update configurator version to 0.3.0
update configurator version to 0.3.0

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng ce71921011 configurator: fix some schema field does not provide display name issue
fix some schema field does not provide display name issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng 3f1057b747 configurator: fix single vm scenario load issue
fix single vm scenario load issue

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Weiyi Feng 578a482626 configurator: fix displayed scenario path
fix displayed scenario path

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 12:19:40 +08:00
Zhao Yakui 34bfaa71f6 ACRN:DM: Export BLOB feature to guest
The DMABuf sharing is based on the BLOB feature. This will
check the attribute of system memory for guest_vm and udmabuf.list_limit
parameter. If it meets with the requirement, export the BLOB feature
so that the FE driver in guest_vm can send the blob cmd.
VIRTIO_GPU_CMD_CREATE_BLOB:
VIRTIO_GPU_CMD_SET_SCANOUT_BLOB:
VIRTIO_GPU_CMD_SET_FLUSH(BLOB)

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui c19b2bed18 ACRN:DM: Add the support of blob_buffer from guest_vm
Now Virtio-gpu FE is using the below cmds to submit the framebuffer that
needs to be displayed.
   VIRTIO_GPU_CMD_TRANSFER_TO_HOST_2D
   VIRTIO_GPU_CMD_SET_SCANOUT
   VIRTIO_GPU_CMD_FLUSH

This will introduce twice copy. In order to optimize the twice copy, the below
cmds are added and the virtio-gpu BE can use the dma-buf sharing.
   VIRTIO_GPU_CMD_CREATE_BLOB
   VIRTIO_GPU_CMD_SET_SCANOUT_BLOB
   VIRTIO_GPU_CMD_FLUSH

V2->V3: Remove the inlined header file of devicemodel/include/public/udmabuf.h
to avoid the license issue

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui f9aa6f754a ACRN:DM: Add Texture based on DMAbuf to support dmabuf_sharing rendering
Now the Opengl rendering is used implicitly in SDL backend. But sometimes
it needs to create the texture explicitly based on DMABuf so that it can
render the framebuffer submitted from virtio-gpu.

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui 3645a9557d ACRN:DM: Add one API to query the memfd/offset for the given GPA
After using the memfd to allocate memory for guest vm, it needs to
query the offset in memfd for the given GPA. In order to search the
memfd/offset, the added memory_region from memfd needs to be kept in
one arrary.

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui a46b0058d8 ACRN:DM: Use the memfd to allocate anonymous hugetlb file
The ACRN-DM uses the explicit hugetlb file to allocate the memory
for guest and the 2M/1G hugetlb can be used. This is based on mounting
hugetlb filesystem.
Now the Linux provides one flexbile memfd mechanism to allocate the memory
and this can make it possible to create the udmabuf for sharing. And the
memfd still can be based on Hugetlb 1G/2M policy. This can bring the below
benefits besides the 1G/2M hugetlb support.
a. memfd is based on anonymous file
b. possible dmabuf mechanism

v2->v3: After completing the mmap for memfd, it will call the ftruncate to
set the desired size and then add the F_SEAL_SEAL flag.

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Zhao Yakui 3bf11d9285 ACRN:DM: Check the alignment of mem_size
Now the memory region is aligned down to 2M if 2M hugetlb is supported.
Maybe some contents are dropped if it is not aligned. 

Tracked-On: #7210

Acked-by: Wang Yu <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-01 11:40:43 +08:00
Reyes, Amy 9a4cb33f39 config_tools: Update Configurator UI XSD
- Update labels and descriptions

Tracked-On: #5692
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-04-01 10:04:57 +08:00
Weiyi Feng a79d2ded7e configurator: update configurator dependencies to latest version
update configurator dependencies to latest version

Tracked-On: #6691
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2022-04-01 09:14:43 +08:00