Commit Graph

5242 Commits

Author SHA1 Message Date
David B. Kinder 86eb68a1e7 doc: open external links in new tab
As a UX improvement, use a separate tab when opening links to external
sites (use the same tab for internal links).  Also, use rel=noopener
attribute to improve security when linking to external sites.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-17 15:58:49 -07:00
David B. Kinder 91cbe6c984 doc: fix presentation of kata containers tutorial
Fixed a few layout issues and added link to mailing list

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-16 12:24:47 -07:00
Geoffroy Van Cutsem 398d639fa5 doc: Update Kata Containers tutorial to ACRN v2.0
Update the "Run Kata Containers on a Service VM" tutorial to use ACRN v2.0. It
also uses Ubuntu 20.04 as the baseline instead of Ubuntu 18.04. The Kata
Containers installation method is different as there are no pre-built binaries
for Ubuntu 20.04 yet, so using the 'kata-deploy' approach instead which is more
generic.

Changed link to slideshare.net for the referenced TCM presentation.

Tracked-On: #4944
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-16 12:00:48 -07:00
Geoffroy Van Cutsem c84f3f9a97 doc: update the summary table for all ACRN scenario
Update the table summarizing all ACRN scenario that are defined. The SDC
also offers the opportunity to run a Kata Containers VM and that was missing
from the description.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-06-16 11:35:02 -07:00
Binbin Wu 417ce1b32d dm: passthru: add support to allocate a bar for vmsix on msi emulation
New option "vmsix_on_msi,<bar_id>" is added to specify the passthrough
device needs vMSI-X emulation based on MSI capability.
If vMSI-X on MSI emulation is needed, a virtual BAR will be allocated.

Also, fix a logic error on when to setup INTx.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
Binbin Wu 68b5616a52 dm: passthru: add acpi support for tsn devices
Add needed ACPI tables for TSN device.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
Binbin Wu 6be27cdcab hv: vmsi: add vmsix on msi emulation support
Some passthrough devices require multiple MSI vectors, but don't
support MSI-X. In meanwhile, Linux kernel doesn't support continuous
vector allocation.
On native platform, this issue can be mitigated by IOMMU via interrupt
remapping. However, on ACRN, there is no vIOMMU.
vMSI-X on MSI emulation is one solution to mitigate this problem on ACRN.

This patch adds MSI-X emulation on MSI capability.
For the device needs to do MSI-X emulation, HV will hide MSI capability
and present MSI-X capability to guest.

The guest driver may need to modify to reqeust MSI-X vector.
For example:
        ret = pci_alloc_irq_vectors(pdev, 1, STMMAC_MSI_VEC_MAX,
-                                   PCI_IRQ_MSI);
+                                   PCI_IRQ_MSI | PCI_IRQ_MSIX);

To enable MSI-X emulation, the device should:
- 1. The device should be in vmsix_on_msi_devs array.
- 2. Support MSI, but don't support MSI-X.
- 3. MSI capability should support per-vector mask.
- 4. The device should have an unused BAR.
- 5. The device driver should not rely on PBA for functionality.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
Binbin Wu da1788c9a3 hv: vtd: add an API to reserve continuous irtes
dmar_reserve_irte is added to reserve N coutinuous IRTEs.
N could be 1, 2, 4, 8, 16, or 32.

The reserved IRTEs will not be freed.

Tracked-On:#4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
Binbin Wu 7bfcc673a6 hv: ptirq: associate an irte with ptirq_remapping_info entry
For a ptirq_remapping_info entry, when build IRTE:
- If the caller provides a valid IRTE, use the IRET
- If the caller doesn't provide a valid IRTE, allocate a IRET when the
entry doesn't have a valid IRTE, in this case, the IRET will be freed
when free the entry.

Tracked-On:#4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
Binbin Wu 2fe4280cfa hv: vtd: add two paramters for dmar_assign_irte
idx_in:
- If the caller of dmar_assign_irte passes a valid IRTE index, it will
be resued;
- If the caller of dmar_assign_irte passes INVALID_IRTE_ID as IRTE index,
the function will allocate a new IRTE.

idx_out:
This paramter return the actual index of IRTE used. The caller need to
check whether the return value is valid or not.

Also this patch adds an internal function alloc_irte.
The function takes count as input paramter to allocate continuous IRTEs.
The count can only be 1, 2, 4, 8, 16 or 32.
This is prepared for multiple MSI vector support.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
Binbin Wu 9c52b353fa hv: kconfig: add a range for MAX_IR_ENTRIES
Script only append 'U' for the config of int with a range.
Add a range to MAX_IR_ENTRIES.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
2020-06-16 08:52:56 +08:00
Binbin Wu 957dc4e8d7 acrn-config: ehl: increase max msix table size and irte size
There are three TSN devices on EHL CRB, and each of them need 32
vectors.
In order to support TSN devices, increase msix table size and irte
size.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
David B. Kinder 13e8e3c7f2 doc: adjust search results to bias certain docs
Improve usability of search results to promote tutorials and developer
guides, and demote API and KConfig material, with release notes at the
end.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-15 12:30:36 -07:00
Li Fei1 65e4a16e6a hv: mmu: release 1GB cpu side support constrain
There're some platforms still doesn't support 1GB large page on CPU side.
Such as lakefield, TNT and EHL platforms on which have some silicon bug and
this case CPU don't support 1GB large page.

This patch tries to release this constrain to support more hardware platform.

Note this patch doesn't release the constrain on IOMMU side.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-06-15 15:16:34 +08:00
Li Fei1 6e57553015 Revert "hv: Let trampoline execution use 1GB pages"
This patch tries to release hardware platform 1GB large page support constrain
on CPU side.

There're some silicon bug on lakefield, TNT and EHL platforms which cause CPU
couldn't support 1GB large page. As a result, the pre-assumption The platform
which ACRN supports must support 1GB large page on both CPU side and VTD side
is not true any more.

This reverts commit f01aad7e to let trampoline execution use 2MB pages.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-06-15 15:16:34 +08:00
David B. Kinder 0ad80d1f09 doc: fix misspelling
Fix misspellings in docs missed during regular reviews

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-12 16:54:32 -07:00
Deb Taylor 315b7f3c00 Doc: Grammatical edits to Shared mem based inter-VM comm doc
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-06-12 16:23:27 -04:00
Deb Taylor e707cdc768 Doc: Edits to What is ACRN into doc
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-06-12 16:09:18 -04:00
Deb Taylor b896137afa Doc: Edits to the acrn configuration tool
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-06-12 15:27:57 -04:00
Geoffroy Van Cutsem f671f646a4 doc: Update the GSG for the Industrial scenario with Ubuntu
Update the "Getting Started Guide for ACRN Industry Scenario with Ubuntu Service
VM" document. Specifically:
* Fix some code sequences that were incorrect (wrong file names/paths, etc.)
* Broke down some long lines to improve readibility
* Add some text/notes at places to better explain the process

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-12 11:55:00 -07:00
Geoffroy Van Cutsem 5f28b90dad doc: update "What is ACRN" introduction
Refresh and update the "What is ACRN" document to reflect the latest changes.
Most notably, the scenario definitions have changed.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-06-12 13:48:25 -04:00
Wei Liu 19f629a2fa doc: update acrn_configuration_tool tutorial for RDT feature
update acrn_configuration_tool tutorial for RDT and update uos type
for launch configuration tutorial.

Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-06-12 13:46:43 -04:00
Geoffroy Van Cutsem 5d08f2518f doc: update the 'ivshmem' HLD
Update the 'ivshmem' document to clarify the existence of two similar
mechanisms to expose this device to User VMs. One is implemented in the ACRN
Device Model and another (future) is implemented in the hypervisor.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-06-12 13:45:53 -04:00
Wei Liu 7c7bf767f6 acrn-config: add support to generate General Linux/Yocto/Ubuntu
Add support to generate Linux like oS launch scripts.

Tracked-On: #4901
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-06-11 14:05:19 +08:00
Wei Liu cd1895d1e7 acrn-config: modify whl-ipc-i7 default industry xml
modify whl-ipc-i7 default industry xml to avoid build issue.

Tracked-On: #4913
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-06-11 14:05:19 +08:00
David B. Kinder 60d16feda6 doc: update ivshmem examples
Update edits from PR #4921

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-10 11:44:22 -04:00
Binbin Wu c907a820df hv: config: add msix emulation support
The information needed to enable MSI-x emulation.
Only enable MSI-x emuation for the devices in msix_emul_devs array.
Currently, only EHL has the need to enable MSI-x emulation for TSN
devices.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-10 14:32:15 +08:00
Wei Liu 219bec5146 acrn-config: generate msix emulation information
generate msix emulation information from known exist PCI devices for
board config.

Tracked-On: #4831
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-10 14:32:15 +08:00
Victor Sun bdaa2a58df HV: correct mmap info for multiboot2
The acrn_mbi.mi_mmap_va should point to struct multiboot2_mmap_entry when
boot from multiboot2, which is different from struct multiboot_mmap when
boot from multiboot1. So we should handle mmap info separately for multiboot2.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-06-10 10:50:41 +08:00
Yuan Liu 279a3995b6 doc: add inter-vm communication example
Add the example for two post-launched VMs communication

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2020-06-09 14:37:59 -07:00
Geoffroy Van Cutsem e49e79a05c doc: fix broken links to pre-built images (release 1.6.1)
Fix broken download links to the Service VM and RTVM images that are provided
for ACRN release 1.6.1.

Tracked-On: #4918
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-06-09 08:19:33 -07:00
David B. Kinder 63d7bec3d1 doc: more updates to ivshmem image and doc
Update image and doc with additional review comments

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-08 20:38:15 -07:00
Junming Liu f1d08791b7 doc:Refine GVT-d tutorial
refine GVT-d tutorial

Signed-off-by: Junming Liu <junming.liu@intel.com>
2020-06-08 20:37:47 -07:00
David B. Kinder a884fa15fb doc: update tools docs to use vm-ubuntu name
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-08 20:21:56 -07:00
Tonny Tzeng 99e41c279b doc: add dependencies for building the acrn-libvirt independently
This commit adds the required dependencies for building the acrn-libvirt
from source. The missing packages were installed for building the ACRN
source code, it's no harm to `apt install` the packages if they are
already installed, but this commit make the build of acrn-libvirt
independently.

Tracked-On: #4910
Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
2020-06-08 10:01:02 -07:00
Victor Sun db690e0967 HV: enable multiboot module string as kernel bootargs
Previously the VM kernel bootargs for pre-launched VMs and direct boot mode
of SOS VM are built-in hypervisor binary so end users have no way to change
it. Now we provide another option that the multiboot module string could be
used as bootargs also. This would bring convenience to end users when they
use GRUB as bootloader because the bootargs could be configurable in GRUB
menu.

The usage is if there is any string follows configured kernel_mod_tag in
module string, the string will be used as new kernel bootargs instead of
built-in kernel bootargs. If there is no string follows kernel_mod_tag,
then the built-in bootargs will be the default kernel bootargs.

Please note kernel_mod_tag must be the first word in module string in any
case, it is used to specify the module for which VM.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00
Victor Sun 80262f0602 HV: rename append_seed_arg to fill_seed_arg
Previously append_seed_arg() just do fill in seed arg to dest cmd buffer,
so rename the api name to fill_seed_arg().

Since fill_seed_arg() will be called in SOS VM path only, the param of
bool vm_is_sos is not needed and will be replaced by dest buffer size.

The seed_args[] which used by fill_seed_arg() is pre-defined as all-zero,
so memset() is not needed in fill_seed_arg(), buffer pointer check
and strncpy_s() are not needed also.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00
Victor Sun 47d20f37e1 HV: replace merge_cmdline api with strncat_s
Add a standard string api strncat_s() to replace merge_cmdline() to make code
more readable.

Another change is that the multiboot cmdline will be appended to the end of
configured SOS bootargs instead of the beginning, this would enable a feature
that some kernel cmdline paramter items could be overriden by multiboot cmdline
since the later one would win if same parameters configured in kernel cmdline.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00
Victor Sun bad12039c6 HV: rewrite strncpy_s to be iso c11 compliant
Per C11 standard (ISO/IEC 9899:2011): K.3.7.1.4

1. Copying shall not take place between objects that overlap;
2. If there is a runtime-constraint violation, the strncpy_s function sets
   s1[0] to '\0\;
3. The strncpy_s function returns zero if there was no runtime-constraint
   violation. Otherwise, a nonzero value is returned.
4. The function is implemented with memcpy_s() because the runtime-constraint
   detection is almost same.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00
Victor Sun e254be150a HV: rewrite memcpy_s to be iso c11 compliant
Per C11 standard (ISO/IEC 9899:2011): K.3.7.1.1

1. Copying shall not take place between objects that overlap;
2. If there is a runtime-constraint violation, the memcpy_s function stores
   zeros in the first s1max characters of the object;
3. The memcpy_s function returns zero if there was no runtime-constraint
   violation. Otherwise, a nonzero value is returned.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00
Victor Sun 45d1f38a5b HV: add hv cmdline support for multiboot2
The multiboot2 cmdline would be used as hypervisor cmdline, add parse logic
for the case that hypervisor boot from multiboot2 protocol.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00
Victor Sun c74b1941a0 HV: split sanitize_multiboot_info api
Previously sanitize_multiboot_info() was called after init_debug_pre() because
the debug message can only print after uart is initialized. On the other hand,
multiboot cmdline need to be parsed before init_debug_pre() because the cmdline
could override uart settings and make sure debug message printed successfully.
This cause multiboot info was parsed in two stages.

The patch revise the multiboot parse logic that split sanitize_multiboot_info()
api and use init_acrn_multiboot_info() api for the early stage. The most of
multiboot info will be initialized during this stage and no debug message need
to be printed. After uart is initialized, the sanitize_multiboot_info() would
do sanitize multiboot info and print needed debug messages.

Tracked-On: #4885

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-08 13:30:04 +08:00
David B. Kinder e94922dfdc doc: update ivshmem image with corrections
Fixed spelling errors in the include image

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-07 19:17:34 -07:00
David B. Kinder 686419ce7d doc: fix columns issue with 404 page display
A previous error (now fixed) in how the rst-columns CSS was written,
caused the default rst-columns to use 3 columns, when before (because of
the error) it being ignored.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-05 16:44:15 -07:00
David B. Kinder 3d4cc0bff5 doc: edit ivshmem hld doc
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-05 16:08:08 -07:00
Yuan Liu 19c50a1162 doc: add shared memory based inter-vm communication introduction
The shared memory based inter-vm communication can support high
performance communication between VMs.

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2020-06-05 14:32:33 -07:00
David B. Kinder 6f00cd9a85 doc: tweak kata tutorial pre-requisites
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-05 09:26:22 -07:00
Tonny Tzeng d9672639dc doc: specify component versions used by Kata-on-ACRN tutorial
This commit calls out specific configurations used for the validation.

Tracked-On: #4879
Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
2020-06-05 08:27:01 -07:00
Li Fei1 c4b5af9663 hv: pci: remove some unnecessary functions
We define some functions to read some fields of the CFG header registers. We
could remove them since they're not necessary since calling pci_pdev_read_cfg
is simple.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-06-05 16:53:33 +08:00
Long Liu 1672eca2b9 DM USB: xHCI: Drop commands if slot is disabled
From xHCI spec 4.5.3.2, the only command that software is
allowed to issue for the slot in disabled state is the Enable
Slot Command. Drop other commands in command handle function.

Tracked-On: #4711
Signed-off-by: Long Liu <long.liu@intel.com>
Reviewed-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2020-06-05 15:31:05 +08:00