Commit Graph

6829 Commits

Author SHA1 Message Date
Amy Reyes c6f60dc9e6 doc: terminology cleanup in ivshmem
- Replace UOS or User OS with User VM
- Capitalize ACRN Configurator
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-25 05:52:42 -08:00
Kunhui-Li a3015d3973 doc: replace UUID with vmname to identify a vm
Since the PR #6787 has landed, we need to remove the uuid parameter
"-U" of "acrn-dm" and replace UUID with vm name to identify a VM
in document.

Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-25 05:41:08 -08:00
Oguzhan Ozturk 2d0b4d41be Fixed minor wording and typos 2021-11-25 13:56:21 +08:00
Kunhui-Li 711619f92e config_tools: remove CONFIG_MAX_IR_ENTRIES
remove CONFIG_MAX_IR_ENTRIES the related python code, schema and
all existing scenario XML files since PR #6809 have changed it.

Tracked-On: #6745
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-25 13:37:22 +08:00
Amy Reyes fcb0469bce doc: terminology cleanup in virtio-rnd
- Replace UOS or User OS with User VM
- Replace SOS or Service OS with Service VM
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-24 17:36:35 -08:00
Amy Reyes 8e077ac5ff doc: terminology cleanup in sgx
- Replace SOS or Service OS with Service VM
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-24 17:33:42 -08:00
dongshen 066856d6f9 doc: add vCAT documentation
This patch adds user guide and high level design for vCAT

Tracked-On: #5917
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2021-11-24 06:31:56 -08:00
Amy Reyes 643d07b3f1 doc: terminology cleanup in DM readme
- Replace SOS or Service OS with Service VM
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-24 06:29:25 -08:00
Amy Reyes dec624a0fe doc: terminology cleanup in usb doc
- Replace SOS or Service OS with Service VM
- Replace UOS or User OS with User VM
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-24 06:27:42 -08:00
Amy Reyes caf893c449 doc: terminology cleanup in partitioned GSG
- Replace User OS
- Remove command prompts
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-24 06:22:34 -08:00
Kunhui-Li 11230765c1 config_tools: remove LOW_RAM_SIZE
remove LOW_RAM_SIZE in the related python code, schema and
all existing scenario XMLs because PR #6791 have removed it.

Tracked-On: #6805
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-24 20:54:57 +08:00
Yuanyuan Zhao 1aa04a61d6 dm: fix mevent timing issue
If a file descriptor being monitored by epoll_wait is closed
in another thread, the result is unspecified. So add all mevents
removed in other threads to delete list. And drain the list in
the dispatch mevent thread.

Tracked-On: #6877
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-11-24 20:44:26 +08:00
Xiangyang Wu deec4b24ef HV: life_mngr: add sync delay for WaaG lifecycle manager
The lifecycle manager in Service VM checks sync message every
5 seconds, so need add 5 seconds to sync delay for WaaG
lifecycle manager to avoid unnecessary sync resending.

Tracked-On: #6652

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
2021-11-24 20:29:43 +08:00
Xiangyang Wu 93d0ad543e HV: life_mngr: refine platform shutdown when User VM fails to shutdown
Currently, the lifecycle manager in Service VM will issue poweroff
command to shutdown service VM when User VM fails to shutdown. The
post-launched RTVM with virtio device may hang after Service VM
shutdown.

In this patch, the lifecycle manager in Service VM will stop to
shut down service VM when User VM fails to shutdown. Users have
chance to fix User VM shutdown failure (such as forcelly shutdown
User VM or execute poweroff command in User VM), after the failure
is fixed, user can trigger S5 in service VM to shutdown platform
gracefully.

Tracked-On: #6652

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
2021-11-24 20:29:43 +08:00
Amy Reyes 417c369feb doc: terminology cleanup in RTC virt
- Replace SOS or Service OS with Service VM
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 10:40:48 -08:00
Amy Reyes 7811b6217d doc: terminology cleanup in images (uart)
- Replace SOS or Service OS with Service VM
- Replace UOS or User OS with User VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 10:38:22 -08:00
Amy Reyes e8e0d8acfe doc: terminology cleanup in image (Shell)
- Replace SOS or Service OS with Service VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 10:37:19 -08:00
hangliu1 195d3df4c6 doc: remove VBSK related content
VBSK is not supported anymore, clean the documents up.

Track-On: #6738
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2021-11-22 08:40:38 -08:00
David B. Kinder 83466595c2 doc: update CODEOWNERS for documentation reviewers
Tracked-On: #5581

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-11-23 00:02:21 +08:00
Amy Reyes 41c552dea8 doc: terminology cleanup in file names, labels
- Replace SOS with Service VM
- Replace UOS with User VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 07:57:47 -08:00
Amy Reyes 64f9ef202e doc: terminology cleanup in images (I/O HLD)
- Replace SOS or Service OS with Service VM
- Replace UOS or User OS with User VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 07:43:59 -08:00
Amy Reyes 3207e7c3f1 doc: terminology cleanup in image (Modular Design)
- Replace SOS or Service OS with Service VM
- Replace UOS or User OS with User VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 07:42:52 -08:00
Amy Reyes d65bd0b85c doc: terminology cleanup in images (sriov)
- Replace SOS or Service OS with Service VM
- Replace UOS or User OS with User VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 07:41:03 -08:00
Amy Reyes ff44b1c7c2 doc: terminology cleanup in images (trusty tutorial)
- Replace SOS or Service OS with Service VM
- Replace UOS or User OS with User VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 07:37:40 -08:00
Amy Reyes 9af91ed571 doc: terminology cleanup in images (gpio)
- Replace SOS or Service OS with Service VM
- Replace UOS or User OS with User VM

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-22 07:34:29 -08:00
David B. Kinder 545aeb3226 doc: fix 2.3 release notes broken link
Removed the VBS-K Framework Virtualization Overhead Analysis document on
master.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-11-19 08:12:29 -08:00
Xiangyang Wu 1d26695626 doc: refine enable s5 document
Lifecycle Manager will be refined in v2.7, this patch will
refine enable s5 document to align with the latest code.

v1-->v2:
	Remove the prompt from all instructions in this
	document.

Tracked-On: #6652

Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
2021-11-19 07:07:32 -08:00
Musa Ünal 5bc0c97a12 fix misspelling
fix misspelling in memory management doc

Signed-off-by: Musa Unal umusasadik@gmail.com
2021-11-19 07:05:10 -08:00
Zhou, Wu 7d0c05f3ff dm: Skip injecting _PPC and _PCT when _PSS is not constructed
This patch is to eliminate kernel error msgs:
'ACPI Error: AE_NOT_FOUND, Evaluating _PSS'

This is caused by missing of _PSS table in guest ACPI. It would
happen when pstate is not injected to the guest.

Kernel ACPI pstate driver first probes
_PPC(performance capabilites) and _PCT(performance control)
in ACPI. If they exist, then it loads the _PSS(performance state).
If _PPC/_PCT are presented while _PSS is missing, it prints
the error msg.

In acrn-dm, _PPC/_PCT are hard-coded to all vCPUs, while _PSS
are constructed with the pCPUs' pstate data. This is base on
assumption that all VMs can have pstate.

Now the pstate is given to VM only when the VM is not sharing
any CPU(and no RTVM is setup in the scenario).
When the VM doesn't have pstate, the hypercall will return px_cnt=0,
and the _PSS is not constructed. In this case, _PPC/PCT should not
be injected, too.

Tracked-On: #6848

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-11-17 16:33:11 +08:00
Helmut Buchsbaum 2f54a1862e hv: hypercall: return 0 for empty PX or CX tables
Avoid failing hypercalls by returning 0 for empty PX and CX tables on
HC_PM_GET_CPU_STATE/PMCMD_GET_PX_CNT and
HC_PM_GET_CPU_STATE/PMCMD_GET_CX_CNT.

Tracked-On: #6848

Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@opensource.tttech-industrial.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-11-17 16:33:11 +08:00
Jie Deng e97b171ca2 hv: tee: x86_tee interrupt support
Secure interrupt (interrupt belongs to TEE) comes
when TEE vcpu is running, the interrupt will be
injected to TEE directly. But when REE vcpu is running
at that time, we need to switch to TEE for handling.

Non-Secure interrupt (interrupt belongs to REE) comes
when REE vcpu is running, the interrupt will be injected
to REE directly. But when TEE vcpu is running at that time,
we need to inject a predefined vector to TEE for notification
and continue to switch back to TEE for running.

To sum up, when secure interrupt comes, switch to TEE
immediately regardless of whether REE is running or not;
when non-Secure interrupt comes and TEE is running,
just notify the TEE and keep it running, TEE will switch
to REE on its own initiative after completing its work.

Tracked-On: projectacrn#6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-11-17 15:25:14 +08:00
Jie Deng 314d9ca8af hv: tee: implement the x86_tee hypercalls
This patch implements the following x86_tee hypercalls,

- HC_TEE_VCPU_BOOT_DONE
- HC_SWITCH_EE

Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-11-17 15:25:14 +08:00
Jie Deng 3c9c41b656 hv: tee: add x86_tee hypercall interfaces
This patch adds the x86_tee hypercall interfaces.

- HC_TEE_VCPU_BOOT_DONE

This hypercall is used to notify the hypervisor that the TEE VCPU Boot
is done, so that we can sleep the corresponding TEE VCPU. REE will be
started at the last time this hypercall is called by TEE.

- HC_SWITCH_EE

For REE VM, it uses this hypercall to request TEE service.

For TEE VM, it uses this hypercall to switch back to REE
when it completes the REE service.

Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-11-17 15:25:14 +08:00
Jie Deng f3792a74a3 hv: tee: add TEE VM memmap support
TEE is a secure VM which has its own partitioned resources while
REE is a normal VM which owns the rest of platform resources.
The TEE, as a secure world, it can see the memory of the REE
VM, also known as normal world, but not the other way around.
But please note, TEE and REE can only see their own devices.

So this patch does the following things:

1. go through physical e820 table, to ept add all system memory entries.
2. remove hv owned memory.

Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-11-17 15:25:14 +08:00
Jie Deng 0b1418d395 hv: tee: add an API for creating identical memmap according to e820
Given an e820, this API creates an identical memmap for specified
e820 memory type, EPT memory cache type and access right.

Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2021-11-17 15:25:14 +08:00
Jie Deng c4d59c8f91 hv: tee: Support the concept of companion VM
Add a configuration to support companion VM.

Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2021-11-17 15:25:14 +08:00
Jie Deng 71ae0fdabf hv: tee: add VM flags for x86_tee support
Add two VM flags for x86_tee. GUEST_FLAG_TEE for TEE VM,
GUEST_FLAG_REE for normal rich VM.

Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2021-11-17 15:25:14 +08:00
Amy Reyes 60f9d0bc9a doc: terminology cleanup in kernel params
- Replace SOS or Service OS with Service VM
- Clean up some of the grammar

Signed-off-by: Amy Reyes <amy.reyes@intel.com>
2021-11-16 19:50:30 -08:00
Kunhui-Li cf619333aa misc: remove HV_RAM_SIZE
remove HV_RAM_SIZE under misc directory because PR 6664 has
changed it in HV side.

Tracked-On: #6663
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-17 08:56:57 +08:00
Kunhui-Li 4ee4835d47 config_tools: update files under generic_code directory
update files under generic_code directory with the latest code.

Tracked-On: #6663
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-17 08:56:57 +08:00
Victor Sun 960238cdcb HV: fix build issue on RELEASE version
The HV will be built failed with below compiler message:

  common/efi_mmap.c: In function ‘init_efi_mmap_entries’:
  common/efi_mmap.c:41:11: error: unused variable ‘efi_memdesc_nr’
			[-Werror=unused-variable]
  uint32_t efi_memdesc_nr = uefi_info->memmap_size / uefi_info->memdesc_size;
  ^~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

The root cause is ASSERT() api is for DEBUG only so efi_memdesc_nr is not used
in RELEASE code.

The patch fix this issue by removing efi_memdesc_nr declaration;

Tracked-On: #6834

Signed-off-by: Victor Sun <victor.sun@intel.com>
2021-11-16 19:01:44 +08:00
Weiyi Feng aed2187773 config_tools: filled vm to MAX_VM_NUM in vm_configurations.c
filled vm to MAX_VM_NUM in vm_configurations.c

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng 809449d672 config_tool: add GUEST_FLAG_STATIC_VM define in vm_configurations.c.xsl
1. add GUEST_FLAG_STATIC_VM define in vm_configurations.c.xsl.
2. add GUEST_FLAG_STATIC_VM in guest_flags.

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng ae5cec9a98 config_tool: update scenario xml for MAX_VM_NUM field
update scenario xml for MAX_VM_NUM field

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng ed5d28a840 config_tool: update scenario and launch xml for vm_name support
update scenario and launch xml for vm_name support

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng c74ac12165 config_tool: reformat scenario and launch xml
reformat scenario and launch xml

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng 56a68d8106 config_tool: let common.MAX_VM_NUM controlled by scenario data
let common.MAX_VM_NUM controlled by scenario data

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng 86f1477482 config_tool: add vm_name field for launch config
add vm_name field for launch config

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Kunhui-Li 7bf25a9d0d config_tools: add assert to check if the scenario is valid
Add assert for below invalid scenario:

1. Two or more pre-launched RTVM
2. One pre-launched RTVM and one or more post-launched RTVM

Tracked-On: #6685
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-16 14:42:59 +08:00
Kunhui-Li ccbf6d4603 config_tools: remove KATA and replace UUID with vmname to identify a vm
1. remove CONFIG_KATA_VM, CONFIG_MAX_KATA_VM_NUM and KATA_VM
related code.
2. remove KATA_VM in scenario xml files.
3. remove KATA vm type in UI.
4. remove UUID DB.
5. remove uuid in the launch script generation logic.
6. use vmname to identify a vm. (eg: <name>ACRN_SOS_VM</name>)
add the check logic to ensure vm name is a must-set item, not duplicated,
and the string length is [1-15] and the whitespace is not allowed.
7. enlarge the max VM num to 32.

Tracked-On: #6685
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-16 14:42:59 +08:00