Commit Graph

6032 Commits

Author SHA1 Message Date
David B. Kinder d70c11985e doc: additional release notes edits
More clarity on doc changes

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-03-29 19:49:02 -07:00
li shuang f583af3747 DOC: Update-GSG-rt_industry_ubuntu
Remove the Power Management ('pm') parameters from the sample launch scripts,
and update the comments, At most one VM is allowed to use "--pm_notify_channel uart"
at a time, since only one socket connection to SOS life_mngr is allowed.
Remove it by default and allow user to add on demand
rt_industry_ubuntu.rst
enable_s5.rst

Signed-off-by: li shuang <shuangx.li@intel.com>
2021-03-29 19:47:56 -07:00
fuzhongl f94a43f98e Doc: Launch Windows as the Guest VM
Part of unsupported parameters for the latest ACRN-DM code are removed.

Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2021-03-29 19:45:34 -07:00
David B. Kinder 1e175b3146 doc: update v2.4 release notes
Update draft release notes with more information about documentation.
Remove code-block extra indenting.
Add label to roscube gsg so we can link to it (in the releaes notes).
Fix style for :option: references to make them look more links links.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-03-29 19:32:07 -07:00
li shuang be487c23a2 config-tools: modify sample launch scripts
delete pm para in sample launch scripts and update the comments

Tracked-On: #5736
Signed-off-by: li shuang <shuangx.li@intel.com>
2021-03-30 09:21:57 +08:00
Geoffroy Van Cutsem 4e8ccd166f doc: create a copy of the scenario file before making modifications
Instruct the user to create a copy of the scenario XML file if modifications
are needed. That modified copy should subsequently be used for building ACRN.

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 17:07:50 -07:00
guoqingxz 725f525f9f Update doc/tutorials/using_partition_mode_on_nuc.rst
Co-authored-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 17:07:50 -07:00
guoqingxz cce2874ff1 Update doc/getting-started/building-from-source.rst
Co-authored-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 17:07:50 -07:00
guoqingxz 682ffb5234 doc: update doc for hybrid and logical_partition mode:
using_hybrid_mode_on_nuc.rst
     using_partition_mode_on_nuc.rst

Signed-off-by: guoqingxz <guoqingx.q.zhang@intel.com>
2021-03-29 17:07:50 -07:00
Geoffroy Van Cutsem 83c82f01c3 doc: update acpica-unix version to latest (20210105)
Update the ACPI Component Architecture package (acpica-unix) to
the latest version available as of today: 20210105

Tracked-On: #5553
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 15:46:49 -07:00
Junjie Mao 7fed0b839f doc: add summary of config changes and upgrading guides
v2:
 * Add the complete instructions to upgrade Python
 * Add libxml2-utils as another additional tool required for building v2.4
 * Random typo fixes

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Benjamin Fitch <benjamin.fitch@intel.com>
2021-03-29 11:42:52 -07:00
Junjie Mao 14e8e68d39 Makefile: add missing dependencies for parallel execution of make
This patch adds the following dependencies among recipes:

 - Building of any C file depends on $(HV_CONFIG_TIMESTAMP) which indicates
   the presence of generated configuration files.
 - Source files listed in $(VM_CFG_C_SRCS), which are the generated
   configuration files, depends on $(HV_CONFIG_TIMESTAMP)

With the dependencies above, the build system can now safely be executed in
parallel, e.g. `make -j4`.

Tracked-On: #5874
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-03-29 15:45:56 +08:00
Geoffroy Van Cutsem 52d2b0954a Makefile: create top-level target for the ACRN life_mngr
The ACRN life_mngr is not built by default as it is a component
that will run in the User VM. Instead we create a 'life_mngr'
(and 'life_mngr-install') targets to build it individually from
the top-level folder.

Tracked-On: #5660
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 15:38:29 +08:00
Geoffroy Van Cutsem f007fc501a tools: do not build life_mngr by default
Do not build (or install) the ACRN life_mngr by default as this is
a User VM tool, not one to be used and run in the Service VM.

The component can still be built independantly by invoking
'make -C misc life_mngr' (components will be built and placed in
'misc/build/services/' by default).

Tracked-On: #5660
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 15:38:29 +08:00
Li Fei1 d1ae797742 hv: pgtable: move sanitize_pte into pagetable.c
sanitize_pte is used to set page table entry to map to an sanitized page to
mitigate l1tf. It should belongs to pgtable module. So move it to pagetable.c

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2021-03-29 13:28:55 +08:00
Li Fei1 ef90bb6db3 hv:pgtable: rename lookup_address to pgtable_lookup_entry
lookup_address is used to lookup a pagetable entry by an address. So rename it
to pgtable_lookup_entry to indicate this clearly.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-29 13:28:55 +08:00
Li Fei1 36ddd87a09 hv: pgtable: remove alloc_ept_page
alloc_page/free_page should been called in pagetable module. In order to do this,
we add pgtable_create_root and pgtable_create_trusty_root to create PML4 page table
page for normal world and secure world.

After this done, no one uses alloc_ept_page. So remove it.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-29 13:28:55 +08:00
Li Fei1 ea701c63c7 hv: pgtable: add pgtable_create_trusty_root
Add pgtable_create_trusty_root to allocate a page for trusty PML4 page table page.
This function also copy PDPT entries from Normal world to Secure world.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-29 13:28:55 +08:00
Li Fei1 596c349600 hv: pgtable: add pgtable_create_root
Add pgtable_create_root to allocate a page for PMl4 page table page.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-29 13:28:55 +08:00
Li Fei1 eb52e2193a hv: pgtable: refine name for pgtable add/modify/del
Rename mmu_add to pgtable_add_map;
Rename mmu_modify_or_del to pgtable_modify_or_del_map.
And move these functions declaration into pgtable.h

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-29 13:28:55 +08:00
Geoffroy Van Cutsem 5535f25637 Makefile: add pre-requisite before building the hypervisor
Add the 'hvdefconfig' as a pre-requisite before building the hypervisor.
This solves the problem when using multiple parallel threads (i.e.
"make -j2").

Tracked-On: #5874
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 13:27:57 +08:00
Yang,Yu-chu 1d1a434a64 config-tools: loosen IVSHMEM_REGION restriction in schema
A scenario can enable multiple IVSHMEM_REGIONs, loosen the restriction
to extend multiple regions support.

Tracked-On: #5863
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-03-29 13:26:52 +08:00
Geoffroy Van Cutsem afe07cc237 Makefile: automatically determine the location of 'iasl'
The 'iasl' binary (from the acpica) package can be installed in
different locations depending on the distribution. By default,
we look for it under '/usr/sbin/'. But it is also often found
under '/usr/bin'. This can be overwritten by setting the ASL_COMPILER
flag when compiling ACRN.

This patch goes one step further and automatically determine where
'iasl' is on the development system if the ASL_COMPILER variable
has not been set already.

Tracked-On: #5854
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-29 13:21:56 +08:00
Geoffroy Van Cutsem ac091bacba acrn_manager: create acrnctl configuration folder when starting
The creation of the acrn_manager ('acrnctl') configuration folder
is currently done when adding a new VM to the system. This leads to
an error (non-fatal) thrown on the terminal is calling, say 'list'
first without having added a VM yet. This patch moves the creation
of such folder as part of main() thereby ensuring it is created as
soon as the program starts.

Tracked-On: #4898
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-25 14:37:21 +08:00
liujunming ffd13a2fe1 hv: vpci: fix msi enable issue under some cases
In VT-d scenario, if MSI interrupt has been enabled,
vCPU writes the content in MSI registers,
and all bits of the content are read-only.

In this case, hypervisor code will call
enable_disable_msi(vdev, false), which will disable MSI.
And there's no chance to call remap_vmsi.
This is wrong behavior, which will result in the disable of MSI.

Tracked-On: #5847

Reviewed-by: Li Fei1 <fei1.li@intel.com>
Signed-off-by: liujunming <junming.liu@intel.com>
2021-03-25 09:39:31 +08:00
David B. Kinder 253204f1a9 doc: update doxygen configuration for API change
Some functions that were in arch/x86/irq.h were moved
into common/irq.h and arch/x86/guest/virq.h.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi 33ef656462 hv/mod-irq: use arch specific header files
Requires explicit arch path name in the include directive.

The config scripts was also updated to reflect this change.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi df36da1b80 hv/mod_irq: do not include x86/irq.h in common/irq.h
Each .c file includes the arch specific irq header file (with full
path) by itself if required.

Tracked-On: #5825
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi 741a208a02 hv/mod_irq: cleanup x86 lapic/ioapic header files
Declarations referenced nowhere else are moved into the c file.

Tracked-On: #5825
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi 6f0a7016d3 hv/mod_irq: move IPI declarations out of x86/irq.h
They are moved into the new header file x86/notify.h.

Tracked-On: #5825
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi ff732cfb2a hv/mod_irq: move guest interrupt API out of x86/irq.h
A new x86/guest/virq.h head file now contains all guest
related interrupt handling API.

Tracked-On: #5825
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi 798015876c hv/mod_irq: move NMI and exception handler out of x86/irq.c
Each of them now resides in a separate .c file.

Tracked-On: #5825

Signed-off-by: Yang, Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi 6098648373 hv/mod_irq: cleanup x86/irq.h
Move exception stack layout struct and exception/NMI handling
declarations from x86/irq.h into x86/cpu.h.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi 3a50f949e1 hv/mod_irq: split irq.c into arch/x86/irq.c and common/irq.c
The common irq file is responsible for managing the central
irq_desc data structure and provides the following APIs for
host interrupt handling.
- init_interrupt()
- reserve_irq_num()
- request_irq()
- free_irq()
- set_irq_trigger_mode()
- do_irq()

API prototypes, constant and data structures belonging to common
interrupt handling are all moved into include/common/irq.h.

Conversely, the following arch specific APIs are added which are
called from the common code at various points:
- init_irq_descs_arch()
- setup_irqs_arch()
- init_interrupt_arch()
- free_irq_arch()
- request_irq_arch()
- pre_irq_arch()
- post_irq_arch()

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi c46e3c71ac hv/mod_irq: decouple irq number reservation from ioapic
This is done be adding irq_rsvd_bitmap as an auxiliary bitmap
besides irq_alloc_bitmap.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi 038e0cae92 hv/mod_irq: split IRQ handling into common and arch specific parts
The common IRQ handling routine calls arch specific functions
pre_irq_arch() and post_irq_arch() before and after calling the
registered action function respectively.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi ac3e0a1718 hv/mod_irq: split irq initialization into common and arch specific parts
The common part initializes the global irq_desc data structure while the
arch specific part initialize the HW and its own irq data.

This is one of the preparation steps for spliting IRQ handling into common
and architecture specific parts.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Liang Yi f3cae9e258 hv/mod_irq: hide arch specific data in irq_desc
Arch specific IRQ data is now an opaque pointer in irq_desc.

This is a preparation step for spliting IRQ handling into common
and architecture specific parts.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-24 11:38:14 +08:00
Geoffroy Van Cutsem a7e53dd32f doc: update BDF information for 'uart=' hypervisor parameter
The 'uart=' parameter for the hypervisor takes multiple forms. One
is to specify the BDF (Bus, Device, Function) value of the serial
port PCI device. The description in the documentation used the
previous format (e.g. '0:18.1') but a 16-bit WORD in HEX needs
to be passed nowadays. E.g.: '0:18.1' is specified by 'uart=0xc1'

Tracked-On: #5842
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
Signed-off-by: Benjamin Fitch <benjamin.fitch@intel.com>
2021-03-23 13:54:10 -07:00
Shuang Zheng fceeb0b511 doc: update path for config editor and desc for some config items
update the path for config editor; update description of vm.name.

Tracked-On: #5644
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-03-23 13:52:49 -07:00
Geoffroy Van Cutsem 109f4e6d90 doc: add 'libxml2-utils' to the list of build dependencies
The ACRN buid system uses 'xmllint' which is provided by the 'libxml2-utils'
package on Ubuntu. This patch adds it to the list of build and development
packages to be installed on the build system to succesfully build ACRN.

Tracked-On: #5861
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-23 13:48:37 -07:00
Shuang Zheng ae659e58ac config_tools: add passthru devices for logical partition scenario on ehl
add passthru devices for logical partition scenario on ehl.

Tracked-On: #5665

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2021-03-18 13:28:26 +08:00
Yang,Yu-chu fb4f8e4e56 config-tools: fix "is_tpm_passthru" always return "False"
"is_tpm_passthru" would always return "False" with the existing logic.

1. Replace "get_leaf_tag_map_bool" with "get_leaf_tag_map". Instead returning a dictrionary with boolean diction values, just get the string value.
2. Return "True" if any vm has enabled the passtrhough tpm with option "y".

Tracked-On: #5710
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-03-12 16:14:46 +08:00
Yang,Yu-chu 6880ca51e4 config-tools: replace "PTDEV_HI_MMIO_START" with "HI_MMIO_START"
"PTDEV_HI_MMIO_START" is removed by the commit
8d9f12f3b7.

Replace "PTDEV_HI_MMIO_START" with "HI_MMIO_START".

Tracked-On: #5693
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-03-12 09:49:07 +08:00
Li Fei1 9000381f34 hv: pgtable: move pgtable definition to pgtable.h
This patch moves pgtable definition to pgtable.h and include the proper
header file for page module.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-03-11 13:48:52 +08:00
Li Fei1 0278a3f46e hv: pgatble: move the EPT page table related APIs to ept.c
Move the EPT page table related APIs to ept.c. page module only provides APIs to
allocate/free page for page table page. pagetabl module only provides APIs to
add/modify/delete/lookup page table entry. The page pool and the page table
related APIs for EPT should defined in EPT module.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-11 13:48:52 +08:00
Li Fei1 5c71ca456a hv: pgatble: move the MMU page table related APIs to mmu.c
Move the MMU page table related APIs to mmu.c. page module only provides APIs to
allocate/free page for page table page. pagetabl module only provides APIs to
add/modify/delete/lookup page table entry. The page pool and the page table
related APIs for MMU should defined in MMU module.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2021-03-11 13:48:52 +08:00
Li Fei1 15d68675e9 hv: pgtable: separate common APIs for MMU/EPT
We would move the MMU page table related APIs to mmu.c and move the EPT related
APIs to EPT.c. The page table module only provides APIs to add/modify/delete/lookup
page table entry.

This patch separates common APIs and adds separate APIs of page table module
for MMU/EPT.

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2021-03-11 13:48:52 +08:00
Li Fei1 80bd3ac02a hv: trusty: move post_uos_sworld_memory into vm.c
post_uos_sworld_memory are used for post-launched VM which support trusty.
It's more VM related. So move it definition into vm.c

Tracked-On: #5830
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-03-11 13:48:52 +08:00
Geoffroy Van Cutsem ddc017a691 Makefile: enhance misc/Makefile for more intuitive usage
Enhance the 'misc/Makefile' to improve readability by grouping the
tools based on whether these are `services` or `debug_tools`
(following the folders they're in) and also create separate build
folders instead of putting *both* services and debug_tools in the
build/misc/debug_tools folder (default value).

Tracked-On: #5793
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-03-11 10:50:28 +08:00