Commit Graph

5218 Commits

Author SHA1 Message Date
Wei Liu d4c9a5fa77 acrn-config: refine ttys type for mapping MMIO
add ttys type for mapping MMIO

Tracked-On: #4798
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-15 13:25:09 +08:00
Wei Liu 843579adf1 acrn-config: remove 'idle=halt' from sos bootargs
Remove "idle=halt" from SOS boot args since the param could be handled
automatically by acrn-config according to CPU scheduler setting.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-15 13:25:09 +08:00
Yonghua Huang 3391bffb27 hv:fix rtvm hang with maxcpus=0/1 in bootargs
RTVM (with lapic PT) boots hang when maxcpus is
 assigned a value less than the CPU number configured
 in hypervisor.

 In this case, vlapic_state(per VM) is left in TRANSITION
 state after BSP boot, which blocks interupts to be injected
 to this UOS.

Tracked-On: #4803
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Li, Fei <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-05-15 10:09:13 +08:00
Mingqiang Chi 4d3221a7f3 acrn-dm: add some logs for vm state transition
add logs for vm state transition to help
analyze some problems.

Tracked-On: #4098
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
2020-05-15 10:06:23 +08:00
David B. Kinder e58609ad1f doc: remove duplicate 1.6 version menu choice
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-14 12:24:26 -07:00
Yuan Liu a99858e9f6 doc: Update acrn edk2 download path
Update acrn edk2 source code download path for WaaG
secure boot feature

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2020-05-14 08:50:55 -07:00
yuhong.tao@intel.com c04c5a5bf0 Doc: cleanup acrnctl usage has pause/continue
Tools: cleanup acrn_mngr pause/continue message

The 'pause/continue' acrnctl cmd is never used and their action are not
defined for ACRN VMs. Remove them from README.

Tracked-On: #4790
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2020-05-14 12:52:59 +08:00
yuhong.tao@intel.com 5a4e488872 Tools: cleanup acrn_mngr pause/continue message
The 'pause/continue' acrnctl cmd is never used and their action are not
defined for ACRN VMs. should be removed. Remove them from acrn_mngr.

Tracked-On: #4790
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2020-05-14 12:52:59 +08:00
yuhong.tao@intel.com bd5e6cec50 Tools: cleanup acrnctl support pause/continue cmd
The 'pause/continue' acrnctl cmd is never used and their action are not
defined for ACRN VMs. should be removed.

Tracked-On: #4790
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2020-05-14 12:52:59 +08:00
yuhong.tao@intel.com bc14dfb0bd DM: cleanup devicemodel monitor handle pause/continue msg request
The 'pause/continue' acrnctl cmd is never used and their action are not
defined for ACRN VMs. Devicemodel minitor doesn't need to handle these 2
msg, should be removed.

Tracked-On: #4790
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Yan, Like <like.yan@intel.com>
2020-05-14 12:52:59 +08:00
Li Fei1 27a66acd0e hv: ptdev: refine look up MSI ptirq entry
There's no need to look up MSI ptirq entry by virtual SID any more since the MSI
ptirq entry would be removed before the device is assigned to a VM.

Now the logic of MSI interrupt remap could simplify as:
1. Add the MSI interrupt remap first;
2. If step is already done, just do the remap part.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong<eddie.dong@Intel.com>
Reviewed-by: Grandhi, Sainath <sainath.grandhi@intel.com>
2020-05-13 14:31:01 +08:00
Li Fei1 27c6f1c007 hv: vpci: remove vpci->vm not equal to null pre-condition
In commit 0a7770cb, we remove vm pointer in vpci structrue. So there's no need
for such pre-condition since vpci is embedded in vm structure. The vm can't be
NULL Once the vpci is not NULL.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong<eddie.dong@Intel.com>
2020-05-13 14:31:01 +08:00
Li Fei1 f9d26a80ed hv: vpci: refine vpci deinit
The existing code do separately for each VM when we deinit vpci of a VM. This is
not necessary. This patch use the common handling for all VMs: we first deassign
it from the (current) user, then give it back to its parent user.

When we deassign the vdev from the (current) user, we would de-initialize the
vMSI/VMSI-X remapping, so does the vMSI/vMSI-X data structure.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong<eddie.dong@Intel.com>
2020-05-13 14:31:01 +08:00
Li Fei1 15e3062631 hv: vpci: remove is_own_device()
Now we could know a device status by 'user' filed, like

---------------------------------------------------------------------------
           | NULL              | == vdev           | != NULL && != vdev
vdev->user | device is de-init | used by itself VM | assigned to another VM
---------------------------------------------------------------------------

So we don't need to modify 'vpci' field accordingly.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong<eddie.dong@Intel.com>
2020-05-13 14:31:01 +08:00
Li Fei1 af8329394b hv: vpci: minor refine the vdev ownership data structure
Add a new field 'parent_user' to record the parent user of the vdev.  And refine
'new_owner' to 'user' to record who is the current user of the vdev. Like

-----------------------------------------------------------------------------------------------
vdev in    |   HV       |   pre-VM       |               SOS                   | post-VM
           |            |                |vdev used by SOS|vdev used by post-VM|
-----------------------------------------------------------------------------------------------
parent_user| NULL(HV)   |   NULL(HV)     |   NULL(HV)     |   NULL(HV)         | vdev in SOS
-----------------------------------------------------------------------------------------------
user       | vdev in HV | vdev in pre-VM |   vdev in SOS  |   vdev in post-VM  | vdev in post-VM
-----------------------------------------------------------------------------------------------

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong<eddie.dong@Intel.com>
2020-05-13 14:31:01 +08:00
Zide Chen 1bc5c7ac5b hv/acrn-config/efi-stuf: assign hvlog and ramoops buffer address < 256MB
If HV relocation is enabled, either ACRN efi-stub or GRUB relocates
hypervisor image above HPA 256MB, thus we put hvlog and ramoops buffer
under 256MB to avoid conflict with hypervisor owned address.

This patch hardcodes these addresses:

0xa00000 - 0xdfffff: 4MiB for ramoops buffer
0xe00000 - 0xffffff: 2MiB for hvlog buffer

However, user can customize them to other addresses as long as it's under
256MB, available in host e820, and SOS bootarg "nokaslr" is not specified.

If HV relocation is disabled, need to make sure that these buffer
addresses are not between HV_RAM_START and HV_RAM_START + HV_RAM_SIZE.

Tracked-On: #4760
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2020-05-13 08:36:54 +08:00
Zide Chen be4797a10c efi-stub: don't relocate hypervisor to address lower than 256MB
With this patch, we relocate hypervisor image to HPA 256MB and above,
thus the hardcoded hvlog and ramoops buffer for SOS can safely reside at
addresses under HPA 256MB, given that 1:1 mapping between SOS GPA and HPA.

Tracked-On: #4760
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
2020-05-13 08:36:54 +08:00
wenlingz b64aa2b2f6 version:2.0-unstable
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2020-05-12 09:36:17 +08:00
David B. Kinder b86e90532b doc: fix malformed acrn-issue references
Syntax of acrn-issue role was incorrect in fixed issues section

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-11 17:29:06 -07:00
David B. Kinder 956f1157e2 doc: edit 1.6.1 release notes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-11 08:48:50 -07:00
David B. Kinder 0b18c9bdb4 doc: add 1.6.1 docs version menu choice
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-11 08:48:08 -07:00
fuzhongl 5ed7f889f1 Doc: releasenotes_1.6.1
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-05-11 08:05:07 -07:00
guoqingxz fb65c42468 doc: update build ACRN doc
Signed-off-by: guoqingxz <guoqingx.q.zhang@intel.com>
2020-05-11 09:31:24 -04:00
fangfang.shen 2db40c9956 doc: update GSG for ACRN V1.6.1.
Signed-off-by: fangfang.shen <fangfang.shen@intel.com>
2020-05-10 14:35:54 -07:00
lirui34 0c36a93cee doc: update industry getting started guide to v1.6.1
Add instruction to launch multiple post launched VMs.

Signed-off-by: lirui34 <ruix.li@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-08 10:06:57 -07:00
David B. Kinder 5850f00880 doc: update libvirt guide
Clean up command-line formatting, reduce line length, prepare for
further technical review.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-08 08:32:41 -07:00
Conghui Chen d7e1f570d4 doc: cpu-sharing doc update
Update cpu-sharing document.

Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2020-05-08 08:31:17 -07:00
Zide Chen 0a956c34c7 hv: add a new field cpu_affinity in struct acrn_vm
For post-launched VMs, the configured CPU affinity could be different
from the actual running CPU affinity. This new field acrn_vm->cpu_affinity
recognizes this difference so that it's possible that CREATE_VM
hypercall won't overwrite the configured CPU afifnity.

Change name cpu_affinity_bitmap in acrn_vm_config to cpu_affinity.
This is read-only in run time, never overwritten by acrn-dm.

Remove vm_config->vcpu_num, which means the number of vCPUs of the
configured CPU affinity. This is not to be confused with the actual
running vCPU number: vm->hw.created_vcpus.

Changed get_vm_bsp_pcpu_id() to get_configured_bsp_pcpu_id() for less
confusion.

Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-05-08 11:04:31 +08:00
Zide Chen 0629c5c8c2 hv/acrn-config: changed name from cpu_affinity_bitmap to cpu_affinity
Tracked-On: #4616
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-05-08 11:04:31 +08:00
Sainath Grandhi bf1ff8c98f hv: Offload syncing PIR to vIRR to processor hardware
ACRN syncs PIR to vIRR in the software in cases the Posted
Interrupt notification happens while the pCPU is in root mode.

Sync can be achieved by processor hardware by sending a
posted interrupt notiification vector.

This patch sends a self-IPI, if there are interrupts pending in PIR,
which is serviced by the logical processor at the next
VMEnter

Tracked-On: #4777
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-05-08 10:01:07 +08:00
Yan, Like 869ccb7ba8 HV: RDT: add CDP support in ACRN
CDP is an extension of CAT. It enables isolation and separate prioritization of
code and data fetches to the L2 or L3 cache in a software configurable manner,
depending on hardware support.

This commit adds a Kconfig switch "CDP_ENABLED" which depends on "RDT_ENABLED".
CDP will be enabled if the capability available and "CDP_ENABLED" is selected.

Tracked-On: #4604
Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-05-08 08:50:13 +08:00
Yan, Like 277c668b04 HV: RDT: clean up RDT code
This commit makes some RDT code cleanup, mainling including:
- remove the clos_mask and mba_delay validation check in setup_res_clos_msr(), the check will be done in pre-build;
- rename platform_clos_num to valid_clos_num, which is set as the minimal clos_mas of all enabled RDT resouces;
- init the platform_clos_array in the res_cap_info[] definition;
- remove the unnecessary return values and return value check.

Tracked-On: #4604
Signed-off-by: Yan, Like <like.yan@intel.com>
2020-05-08 08:50:13 +08:00
Yan, Like f774ee1fba HV: RDT: merge struct rdt_cache and rdt_membw in to a union
A RDT resource could be CAT or MBA, so only one of struct rdt_cache and struct rdt_membw
would be used at a time. They should be a union.
This commit merge struct rdt_cache and struct rdt_membw in to a union res.

Tracked-On: #4604
Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com
2020-05-08 08:50:13 +08:00
Deb Taylor bfe2a1c525 Doc: Initial file: Config ACRN using OpenStack & libvert
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2020-05-07 16:12:10 -04:00
Zide Chen 64e0f498a7 doc: update hvlog kernel parameter descriptions
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-05-07 10:50:07 -07:00
Yonghua Huang c4ab748cb9 doc: update security advisory for 1.6.1 release
Update mitigations for security vulnerabilities
 for ACRN 1.6.1 release

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-07 10:48:21 -07:00
David B. Kinder 765e40bdb1 doc: edit notes on serial connection need
Clarify wording on tutorial notes about needing a serial port connection.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-05-07 10:08:21 -07:00
Geoffroy Van Cutsem 7689b92ed0 doc: update Zephyr document to indicate a serial port is needed
Update the "Run Zephyr as the User VM" document to add a note indicating a
serial port connection to the platform may be needed to see the Zephyr output
depending on the scenario  used (SDC vs. industrial).

Tracked-On: #4553
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-05-07 08:52:11 -07:00
Geoffroy Van Cutsem a69a5608da doc: add note to the Celadon User VM tutorial
Add a note to the "Run Celadon as the User VM" tutorial to indicate a serial
port connection to the platform (or change of the default config) may be needed
if the user uses a scenario other than SDC (the default one in the doc).

Tracked-On: #4554
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-05-07 08:51:41 -07:00
yuhong.tao@intel.com b0ae9cfa2b HV: Config Splitlock Detection to be disable
#AC should be normally enabled for slpitlock detection, however,
community developers may want to run ACRN on buggy system.
In this case, CONFIG_ENFORCE_TURNOFF_AC can be used to turn off the
 #AC, to let the guest run without #AC.

Tracked-On: #4765
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-05-07 09:35:22 +08:00
Geoffroy Van Cutsem bf5d187539 devicemodel: remove obsolete argument from list of options
Remove the 'p' argument from the list as it is now obsolete and there is no
implementation for it in the code.

Tracked-On: #4732
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-05-06 13:43:35 +08:00
Geoffroy Van Cutsem 97245363b1 doc: update `acrn-dm` parameters documentation
Update the documentation listing and describing all `acrn-dm` parameters as it
has gone out of sync with the actual implementation. Some parameters are missing
and others are now obsolete.

Tracked-On: #4732
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-05-06 13:43:35 +08:00
Li Fei1 0c6b3e57d6 hv: ptdev: minor refine about ptirq_build_physical_msi
The virtual MSI information could be included in ptirq_remapping_info structrue,
there's no need to pass another input paramater for this puepose. So we could
remove the ptirq_msi_info input.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-05-06 11:51:11 +08:00
Li Fei1 73335b7276 hv: ptirq: rename ptirq_lookup_entry_by_sid to find_ptirq_entry
We look up PTIRQ entru only by SID. So _by_sid could removed.
And refine function name to verb-obj style.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-05-06 11:51:11 +08:00
Wei Liu da749bcf84 acrn-config: update tgl-rvp board information
Update tgl-rvp board information.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-05-06 11:37:14 +08:00
Yin Fengwei 68269a559f gpa2hva: add INVAVLID_HPA return value check
For return value of local_gpa2hpa, either INVALID_HPA or NULL
means the EPT walking failure. Current code only take care of
NULL return and leave INVALID_HPA as correct case.

In some cases (if guest page table is filled with invalid memory
address), it could crash ACRN from guest.

Add INVALID_HPA return check as well.
Also add @pre assumptions for some gpa2hpa usages.

Tracked-On: #4730
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2020-05-06 11:29:30 +08:00
Wei Liu 0a3ca1974e acrn-config: fix log macros for board defconfig
fix macros log level for board defconfig.

Tracked-On: #4752
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu d03d6e96e0 acrn-config: add clearlinux UOS for launch config xmls
add 6 clearlinux UOSes for launch config xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu 1d1270766c acrn-config: enable gvtd for waag for nuc7/nuc6 board
enable gvtd for waag of nuc7/nuc6 board by default.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00
Wei Liu a94f04fb94 acrn-config: add 4 POST_STD_VM and 1 KATA_VM for industry config xmls
For nuc7/nuc6/whl-ipci5/whl-ipc-i7 board, add 4 POST_STD_VM and 1
KATA_VM in their industry config xmls, and assign PCPU0-1 to these
PRE_LAUNCHED_VM.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-06 11:25:57 +08:00