Commit Graph

7356 Commits

Author SHA1 Message Date
Zhao Yakui 2e9773ed55 ACRN:DM: Avoid calling surface_set in course of virtio_gpu_reset
This is not needed as it is reconfigured in course of vga_thread_loop.
At the same time it is not thread-safe as the 3D api is involved
in vdpy_surface_set.

v2->v3: move the initialization of vga_surface width/height into
vga_thread.

Tracked-On: #7296
Acked-by: Wang Yu1 <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-19 18:30:06 +08:00
Zhao Yakui c73773c130 ACRN:DM: Avoid creating multi threads for vga_thread
In order to support the VGA op, one vga_thread is created. But
in course of virtio_gpu_reset, it will also create one vga_thread.
This is incorrect.

v1->v2: the thread_id of vga_thread is treated as read-only after
the thread is created.
        One thread_status based on atomic type indicates the life_cycle
of vga_thread.

v2->v3: Add the vga_thread_mtx in course of changing life_cycle of vga_thread

Tracked-On: #7296
Acked-by: Wang Yu1 <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2022-04-19 18:30:06 +08:00
Fei Li 6b32b28e72 hv: ptdev: address vector scalability problem by interrupt posting
Now interrupt vector in ACRN hypervisor is maintained as global variable, not
per-CPU variable. If there're more PCI devices, the physical interrupt vectors
are not enough most likely.

This patch would not allocate physical interrupt vector for MSI/MSI-X vectors
if interrupt posting could been used to inject the MSI/MSI-X interrupt to
a VM directly.

Tracked-On: #7275
Signed-off-by: Fei Li <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2022-04-19 14:54:04 +08:00
hangliu1 7bcc5b7383 config tool:add support for bootargs missing
Bugfix:bootargs is optional parameter, which may be not
present in xml as a node, asl_gen.py needs to process
that case.

Tracked-On: #7307
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-04-19 13:20:08 +08:00
Reyes, Amy 1b1f5fe2d9 doc: Fix typo in DM parameters
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-04-18 18:36:59 -07:00
David B. Kinder b0b5229327 doc: fix table CSS font size changing with lists
The read-the-docs theme uses a reduced font size within tables.  The CSS
used though is overly restrictive and doesn't properly handle tables
containing lists or other constructs where the paragraph tags don't have
the <td> tag within the table as the immediate parent.  Add an
overriding style in our custom CSS to fix this so the font size on lists
within a table are the same as normal paragraphs within a table.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2022-04-18 18:36:39 -07:00
Reyes, Amy d881276fee doc: Add note to GSG about optional upgrade
- Add comment in upgrade command in case users ignore description above command

Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-04-18 17:18:14 -07:00
Reyes, Amy 89c15567b0 doc: Capitalize Board Inspector and ACRN Configurator
Signed-off-by: Reyes, Amy <amy.reyes@intel.com>
2022-04-18 17:17:40 -07:00
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