Commit Graph

4902 Commits

Author SHA1 Message Date
Jack Ren aa5e978b06 version: 1.7-unstable
Signed-off-by: Jack Ren <jack.ren@intel.com>
2020-04-02 10:24:37 +08:00
Wei Liu 5c297be955 acrn-config: find 64-bit mmio for HI_MMIO_START/HI_MMIO_END
Find the 64-bit mmio window from /proc/iomem to generate HI_MMIO_START/HI_MMIO_END.

Tracked-On: #4569
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-02 09:54:09 +08:00
Wei Liu 697f3fc09f acrn-config: update IOMEM_INFO of native board config xml
Replace SYSTEM_INFO with IOMEM_INFO for board xml files.

Tracked-On: #4569
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-02 09:54:09 +08:00
Wei Liu 6a9319b685 acrn-config: dump iomem info from /proc/iomem
Need more information from iomem, so dump all the iomem information
from /proc/iomem to instead of system ram information.

Tracked-On: #4569
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-02 09:54:09 +08:00
Deb Taylor de3bc3faec Doc: Release Notes update based on DKinder edits
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-04-01 19:28:25 -04:00
Deb Taylor 9a805f6c6b Doc: Grammactical edits to Release Notes 1.6
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-04-01 14:28:31 -04:00
Deb Taylor f282e8de0a Doc: Minor grammatical updates to rt_industry.html and building_acrn_in_docker.html
Refer to PRs 4568 and 4559.

Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-04-01 11:38:54 -04:00
Sainath Grandhi 8ffe6fc67a hv: Reserve space for VMs' EPT 4k pages after boot
As ACRN prepares to support servers with large amounts of memory
current logic to allocate space for 4K pages of EPT at compile time
will increase the size of .bss section of ACRN binary.

Bootloaders could run into a situation where they cannot
find enough contiguous space to load ACRN binary under 4GB,
which is typically heavily fragmented with E820 types Reserved,
ACPI data, 32-bit PCI hole etc.

This patch does the following
1) Works only for "direct" mode of vboot
2) reserves space for 4K pages of EPT, after boot by parsing
platform E820 table, for all types of VMs.

Size comparison:

w/o patch
Size of DRAM            Size of .bss
48 GB                   0xe1bbc98 (~226 MB)
128 GB                  0x222abc98 (~548 MB)

w/ patch
Size of DRAM            Size of .bss
48 GB                   0x1991c98 (~26 MB)
128 GB                  0x1a81c98 (~28 MB)

Tracked-On: #4563
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 21:13:37 +08:00
lirui34 24cfdacb99 doc: update industry gsg to v1.6 release
- Update quick setup script to support whl board.
- Change board to WHL NUC.
- Change the Service VM disk to NVMe.
- Update CL version to 32680 and ACRN tags info.
- Update CL and acrn tag versions for waag user vm tutorial.

Signed-off-by: lirui34 <ruix.li@intel.com>
2020-04-01 05:42:15 -04:00
fuzhongl 0244bcaf5d Doc: releasenotes_1.6
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-04-01 05:40:09 -04:00
fangfang.shen 122b2185ce Doc: update building acrn in docker for V1.6
One known issue :acrn-issue:`4560` during build ACRN HV.
Please refer to  next section to get Docker Image from Docker Hub.

Signed-off-by: fangfang.shen <fangfang.shen@intel.com>
2020-04-01 05:38:22 -04:00
Sainath Grandhi a19bcec6b9 acrn-config: Limit check on Pre-Launched VM RAM size
size and size_hpa2 can be greater than 2GB for Pre-Launched VMs.

Tracked-On: #4565
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-04-01 16:39:21 +08:00
Qian Wang da027ff622 HV: Changed enum to marco to pass MISRA-C check
hv: acpi: changed the enum "acpi_dmar_type" to macros to pass the
MISRA-C check

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Qian Wang c20228d36f HV: simplified the logic of dmar_wait_completion
hv: vtd: simplified the logic of dmar_wait_completion

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Qian Wang 698ad6bd4d HV: renamed some structs more understandably
hv: pci: renamed some internal data structs to make them more
understandable

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Qian Wang 60704a5d9c HV: renamed some static functions related to dmar
hv: vtd: renamed some static functions from dmar_verb to verb_dmar

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Qian Wang c2bcf9fade HV: simplified the logic of iommu_read/write64
hv: vtd: simplified the logic of iommu_read/write64

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Qian Wang a1e081073f HV: Corrected return type of two static functions
hv: vtd: corrected the return type of get_qi_queue and get_ir_table to
void *

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Qian Wang fc9f089902 HV: remove multi-return in drhd_find_iter
hv: dmar_parse: remove multi-return in drhd_find_iter

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Qian Wang b55f414a9d HV: Removed unused member variable of iommu_domain and related code
hv: vtd: removed is_host (always false) and is_tt_ept (always true) member
variables of struct iommu_domain and related codes since the values are
always determined.

Tracked-On: #4535
Signed-off-by: Qian Wang <qian1.wang@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-04-01 10:43:54 +08:00
Deb Taylor c4531e3bc0 Minor edits to VT-d page.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-03-31 17:56:07 -04:00
Binbin Wu 1c925187ab doc: vt-d: update the description of snoop control
Tracked-On: #4509
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
2020-03-31 15:39:44 -04:00
Li Fei1 ea2616fbbf hv: vlapic: minor fix about dereference vcpu from vlapic
Since vcpu if remove from vlapic, we could not dereference it directly.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-31 15:59:52 +08:00
Li Fei1 2b7168da9e hv: vmtrr: remove vcpu structure pointer from vmtrr
We could use container_of to get vcpu structure pointer from vmtrr. So vcpu
structure pointer is no need in vmtrr structure.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-31 10:57:47 +08:00
Li Fei1 1946661c51 hv: vpic: remove vm structure pointer from vpic
We could use container_of to get vm structure pointer from vpic. So vm
structure pointer is no need in vpic structure.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-31 10:57:47 +08:00
Li Fei1 0a7770cbb7 hv: vpci: remove vm structure pointer from vpci
We could use container_of to get vm structure pointer from vpci. So vm
structure pointer is no need in vpci structure.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-31 10:57:47 +08:00
Li Fei1 a7768fdb6a hv: vlapic: remove vcpu/vm structure pointer from vlapic
We could use container_of to get vcpu/vm structure pointer from vlapic. So vcpu/vm
structure pointer is no need in vlapic structure.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-31 10:57:47 +08:00
Li Fei1 7f342bf62f hv: list: rename list_entry to container_of
This function casts a member of a structure out to the containing structure.
So rename to container_of is more readable.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-31 10:57:47 +08:00
dongshen 1328dcb205 hv: extend union dmar_ir_entry to support VT-d posted interrupts
Exend union dmar_ir_entry to support VT-d posted interrupts.

Rename some fields of union dmar_ir_entry:
  entry --> value
  sw_bits --> avail

Tracked-On: #4506
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@Intel.com>
2020-03-31 10:30:30 +08:00
dongshen 016c1a5073 hv: pass pointer to functions
Pass intr_src and dmar_ir_entry irte as pointers to dmar_assign_irte(),
which fixes the "Attempt to change parameter passed by value" MISRA C violation.

A few coding style fixes

Tracked-On: #4506
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@Intel.com>
2020-03-31 10:30:30 +08:00
dongshen 0f3c876a91 hv: extend struct pi_desc to support VT-d posted interrupts
For CPU side posted interrupts, it only uses bit 0 (ON) of the PI's 64-bit control
, other bits are don't care. This is not the case for VT-d posted
interrupts, define more bit fields for the PI's 64-bit control.
Use bitmap functions to manipulate the bit fields atomically.

Some MISRA-C violation and coding style fixes

Tracked-On: #4506
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@Intel.com>
2020-03-31 10:30:30 +08:00
dongshen 8f732f2809 hv: move pi_desc related code from vlapic.h/vlapic.c to vmx.h/vmx.c/vcpu.h
The posted interrupt descriptor is more of a vmx/vmcs concept than a vlapic
concept. struct acrn_vcpu_arch stores the vmx/vmcs info, so put struct pi_desc
in struct acrn_vcpu_arch.

Remove the function apicv_get_pir_desc_paddr()

A few coding style/typo fixes

Tracked-On: #4506
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@Intel.com>
2020-03-31 10:30:30 +08:00
dongshen b384d04ad1 hv: rename vlapic_pir_desc to pi_desc
Rename struct vlapic_pir_desc to pi_desc
Rename struct member and local variable pir_desc to pid

pir=posted interrupt request, pi=posted interrupt
pid=posted interrupt descriptor
pir is part of pi descriptor, so it is better to use pi instead of pir

struct pi_desc will be moved to vmx.h in subsequent commit.

Tracked-On: #4506
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Reviewed-by: Eddie Dong <eddie.dong@Intel.com>
2020-03-31 10:30:30 +08:00
Wei Liu e1ae5ba638 acrn-config: support '--out' option for board/scenario/launch config
Currently, config tool generate board files and scenario files in
acrn-hypervisor directory, the origin souce code would be corrupted by
the config tool. Config tool add '--out' option for user to give a path
to store the generated files, without this option, tool will generate
files in origin source code.

Tracked-On: #4517
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu 6b9c1f2d31 acrn-config: correct passthru 'audio' device for nuc6cayh
Correct mismatch PCI audio device for passthrough in nuc6cayh.

Tracked-On: #4530
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu 4e9e052bcb acrn-config: minor fix for generating CONFIG_PCI_BDF
Modify the pattern to grap the correct PCI BDF from board information
file.

Tracked-On: #4530
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu b42c283b20 acrn-config: add some configs in board defconfig
1. add CONFIG_scenario=y config in $(BOARD).config file so that
SCENARIO parameter will not be needed when build with xmls.

2. add CONFIG_MAX_KATA_VM_NUM;

3. add CONFIG_ENFORCE_VALIDATED_ACPI_INFO=y because all ACPI info
generated by acrn-config has been validated;

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu 3c425fa919 acrn-config: remove git check and avoid to generate patch for config files
Remove '--enable_commit' argument since acrn-config will not use git tool any
more.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Victor Sun 0074ad1d20 acrn-config: one button to generate config file
Currently we use separate button to generate board configuration files and
scenario configuration files for hypervisor, this is not friendly from UX
perspective. So remove redundant button on HV configuration generation.

Tracked-On: #3854
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Shuang Zheng <shuang.zheng@intel.com>
2020-03-31 10:27:33 +08:00
Zide Chen 1d2aea1ebd hv: some coding refinement in hypercall.c
- since now we don't need to print error messages if copy_to/from_gpa()
  fails, then in many cases we can simplify the function return handling.

  In the following example, my fix could change the 'ret' value from
  the original '-1' to the actual errno returned from copy_to_gpa(). But
  this is valid. Ideally we may replace all '-1' with the actual errno.

  - if (copy_to_gpa() < 0) {
  -	pr_err("error messages");
  -	ret = -1;
  - } else {
  -	ret = 0;
  - }
  + ret = copy_to_gpa();

- in most cases, 'ret' is declared with a default value 0 or -1, then the
  redundant assignment statements can be removed.

- replace white spaces with tabs.

Tracked-On: #3854
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-30 13:19:01 +08:00
Zide Chen eef3b51eda hv: move error message logging into gpa copy APIs
In this way, the code looks simpler and line of code is reduced.

Tracked-On: #3854
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-30 13:19:01 +08:00
Deb Taylor 37291fa890 Doc: Grammatical/style edits to split device model page
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-03-29 22:17:07 -04:00
Junming Liu 86aa338a5f dm: correct PCI configures of igd-lpc
previous patch fails to align SUBVID, SUBDID of igd-lpc with physical one.
this patch corrects the errors and refine the code.

Tracked-On: #4405

Signed-off-by: Junming Liu <junming.liu@intel.com>
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-03-30 10:06:20 +08:00
Deb Taylor ac6be7b591 Doc: Minor edits to Xenomai page
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-03-29 20:43:00 -04:00
Deb Taylor 284d63f11a Doc: Edits to MBA and CAT documentation.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-03-29 18:57:57 -04:00
Deb Taylor 4064286e07 Doc Minor edits to Security page
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-03-29 18:57:11 -04:00
Vijay Dhanraj a2763ab7f0 doc: Add MBA documentation and update doc for CAT
This patch updates CAT documentation as well as adds
documentation support for newly added MBA feature.

Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2020-03-27 16:58:20 -04:00
Li Fei1 86957d702a doc: introduce Split Device Model feature for ACRN
Introduce Split Device Model feature for ACRN. Now we only implement pass through
PCI(e) device of it.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-27 16:41:58 -04:00
Tw 0f9e9ee0c4 Doc: add instructions for using Xenomai as UOS
Signed-off-by: Tw <wei.tan@intel.com>
2020-03-27 16:39:39 -04:00
Yonghua Huang 3de67830f6 doc: update security advisory for v1.6 release
Update mitigations for security vulnerabilities
  for ACRN v.16 release.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2020-03-27 16:35:51 -04:00