I. Add three kinds of Inter-VM communication advantage and shortage:
1. Inter-VM vUART
2. Inter-VM network communication
3. Inter-VM shared memory device (ivshmem)
II.Add how to implement an Ivshmem application on ACRN.
Signed-off-by: Hu Fenglin <fenglin.hu@intel.com>
Hook ssram init && de-init functions to vdev
devices lifecycle management:
1) initialize ssram when vdev devices
are initialized.
2) de-initialize ssram when vdev devices
are reset or destroyed.
notes:
ssram configuration data can be released only when
user VM shutdown, hence it can't be done in deinit_vssram().
- VM reboot:
do deinit_vssram() only.
- VM shutdown:
do both deinit_vssram() and clean_vssram_config().
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
Add TCC native memory hierarchy entries to vRTCT:
- wrap one function to get TCC RTCT data.
- Add memory hierarchy entries from TCC
RTCT to vRTCT.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
add all L2 & L3 cache buffers to RTCT entries:
- SSRAM WAY_MASK entry, cache ways bitmask indicates
the cache ways used by specific cache buffer.
- SSRAM region entry, support format V2 only.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
This patch initializes below entries in vRTCT:
- Hardcode ACPI header
- Hardcode RTCT compatibility entry, support RTCT v2 only
for ACRN user VMs.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
Add EPT mapping for all L2 & L3 vSSRAM buffers
for user VM.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Yu1 Wang <yu1.wang@intel.com>
This patch allocates cache buffers from native TCC
buffer driver and do setup, make them ready to be
mapped to ACRN user VMs as software SRAM regions.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Yu1 Wang <yu1.wang@intel.com>
- wrap TCC driver interface to get SSRAM regions count
and region configuration.
- add function to load configurations of all SSRAM regions.
- Add header file to describe TCC data structure.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
This patch figures out the guest cache hierarchy:
- calculate the cache hierarchy parameters, including
cache thread sharing number and inclusiveness of LLC.
- define and initialize data structure to describe
L2 & L3 cache buffers, these buffers will be mapped
to user VM as ssram regions.
- add some utility functions.
- complete the implementation of function
'create_ssram_rtct_entries()', though most functions
inside are not implemented yet.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Yu1 Wang <yu1.wang@intel.com>
1) With this patch, '--ssram' option is updated to enable
vSSRAM feature support for ACRN user VMs.
'--ssram' argument of Device Model shall follow below format:
--ssram {Ln,vcpu=vcpu_set,size=nK|M;}
example:
--ssram L2,vcpu=0,1,size=4K;L2,vcpu=2,3,size=1M;L3,vcpu=all,size=2M
2) define data structure and variable
to store the configuration data for later processing.
3) add new API to cleanup configuration data when VM shutdown.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
Move below logic out of init_vssram():
- get guest vCPU information
- vssram GPA space
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
virtual RTCT will be created on TCC driver interface, instead of
pass-through native RTCT to ACRN user VMs.
this patch removes dependency on native RTCT table:
- rename build_vrtct() function to init_ssram()
and minor changes inside.
- drop function create_and_inject_vrtct()
- add one API to get virtual RTCT table.
- rename variable 'pt_rtct' to 'ssram'
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
Rename them to unify the coding style or for simplification
purpose, also remove redundant function declearations
in pci_core.h header file.
v4 update:
SSRAM* -> VSSRAM*
ssram* -> vssram*
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
guest ssram will be virtualized based on tcc driver interface,
instead of pass-thru native rtct, rename its source files to
avoid confusing:
- rename:
rtct.c -> vssram.c
rtct.h -> vssram.h
- move rtct.c from platform/acpci/ to platform/
- new directory 'vssram' to hold vssram source files.
Tracked-On: #7010
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
According to PCIe specification (since 2.0), absence of any extended
capabilities is required to be indicated by an extended capability header
with a capability ID of FFFFh and a next capability offset of 000h. Thus,
the board inspector today accesses the first extended capability header at
100h in the configuration space of a PCIe function unconditionally.
However, in practice we have seen real PCI functions which has a PCIe
capability but no extended capability header. This will cause the board
inspector to crash due to invalid configuration space accesses.
To fix that, this patch adds a check to the size of the configuration space
before walking the extended capabilities of a PCIe function.
Tracked-On: #6411
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Currently, if user starts acrnd service, acrnd service will fail to
find the folder "/sys/kernel/gvt" in Service VM, fail to start.
Root cause is GVT-g is not supported in current ACRN, the folder
"/sys/kernel/gvt" will not be created in Service VM.
This patch updates acrnd service to remove this condition check.
v1-->v2:
Weston service is optional for ACRN, acrnd should not depend
on it, so remove weston service dependency in acrnd service.
Tracked-On: #6994
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
User should make sure acrnd service has been started
before running acrnctl.
This patch add note about this.
v2-->v3:
Update document about acrnd service enabling.
Tracked-On: #6991
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Currently, while there is no running post-launched User VM and
user executes acrnctl command, he or she will get failure and
error message is "/run/acrn/mngr doesn't exist".
Root cause of this failure is acrnctl only check whether the folder
"/run/acrn/mngr" exist or not, if this folder doesn't exist, will
report failure.
acrnd service will create the folder "/run/acrn/mngr", user should
make sure acrnd service is started before using acrnctl
This patch will update log message while the folder "/run/acrn/mngr"
doesn't exist.
v1-->v2:
Update log message to make it clearer.
Tracked-On: #6991
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
The following parameters have not used by new design:
1. --vsbl <vsbl_file_path>
2. --part_info <part_info_name>
3. -G, --gvtargs <GVT_args>
4. -s <slot>,pci-gvt
5. -Y, --mptgen
6. -s <slot>,virtio-hdcp
7. -s <slot>,npk
8. -s <slot>,virtio-coreu
9. -i, --ioc_node <ioc_mediator_parameters>
10. --pm_by_vuart [pty|tty],<node_path>
11. --pm_notify_channel <channel>
This patch remove these parameters from usage and comment in code to
explain they are all obsoleted now.
Tracked-On: #6690
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
Update description of passthrough device usecase additions, and improved
description of Issue #6631 (Kata broken)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Otherwise it will fail to set the GPU opregion/stolen_memory for guest VM in
course of GPU passthrough and the display can't work.
Tracked-On: #6988
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Also cleaned out older versions from list, keeping v1.0,
v1.6.1, v2.0, v2.5, and v2.6.
The documentation for previous releases is still available (by editing
the URL to mention that release (e.g., /2.1/ ).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
To launch User VM, cpu_affinity parameter is needed for v2.7.
Signed-off-by: fuzhongl <fuzhong.liu@eintel.com>
Reviewed-by: gvancuts <geoffroy.vancutsem@intel.com>
1. Update launch script and replace the apt-get command with apt in GSG documentation.
2. Update the tag to v2.7 in partitioned documentation.
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Add some color styles we can use (via .. rst-class:: style directive) to
add color to rst tables. Also introduce a centered class instead of
using the deprecated .. centered:: directive. Update documentation
guidelines to describe these new styles (background colors).
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The commands in the Getting Started Guide for copying files to and from
the USB stick will fail if the USB stick volume name has a space in it.
Fix this by quoting uses of $disk.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fix errors in description of changes.
Add mention of SOS -> Service_VM change in config options/values.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Currently in sanitize_vm_config, all LAPIC-PT VM are treated as RTVM,
which can be relaxed: LAPIC PT VM does not have to be RTVM.
Change the logic in sanitize_vm_config to support this relaxation.
Tracked-On: #6968
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Currently, the command "acrnctl suspend" and "acrnctl resume"
is not used by user. This patch removes related code.
Tracked-On: #5921
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Currently, the command "acrnctl suspend" and "acrnctl resume"
is not used by user. This patch removes related code.
v1-->v2:
Remove vm_suspend.
Tracked-On: #5921
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Currently, Service VM may fail to shut down due to some enabled
VFs. ACRN doesn't disable VFs automatically.
In this patch, add a note for user to disable VFs before Service
VM shuts down.
Tracked-On: #5921
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
Rename `CONFIG_IOMMU_BUS_NUM` to `ACFG_MAX_PCI_BUS_NUM`. Configure tool
will calculate `ACFG_MAX_PCI_BUS_NUM` base on the max pci num which is
used by VF. So user needn't care about `ACFG_MAX_PCI_BUS_NUM`, and memory
will be used resonable.
Tracked-On: #6942
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Extract the max pci bus number from board information and generate the
common configuration macro ACFG_MAX_PCI_BUS_NUM automatically.
Tracked-On: #6942
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
remove is_valid_xsave_combination api,
assume the hardware or QEMU can guarantee that support
XSAVE on CPU side and XSAVE_XRSTR on VMX side or not.
will add offline-tool in QEMU platform to avoid the user
use wrong XSAVE configurations.
remov check VMX_PROCBASED_CTLS2_XSVE_XRSTR based on the above reason.
for VMX_PROCBASED_CTLS2_PAUSE_LOOP, now it will panic
if run ACRN over QEMU, here remove it from essential check,
and it will print error information when set this bit
if there is no the hardware capability.
v1-v2:
remove is_valid_xsave_combination
Tracked-On: #6584
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This patch adds an option CONFIG_KEEP_IRQ_DISABLED to hv (default n) and
config-tool so that when this option is 'y', all interrupts in hv root
mode will be permanently disabled.
With this option to be 'y', all interrupts received in root mode will be
handled in external interrupt vmexit after next VM entry. The postpone
latency is negligible. This new configuration is a requirement from x86
TEE's secure/non-secure interrupt flow support. Many race conditions can be
avoided when keeping IRQ off.
v5:
Rename CONFIG_ACRN_KEEP_IRQ_DISABLED to CONFIG_KEEP_IRQ_DISABLED
v4:
Change CPU_IRQ_ENABLE/DISABLE to
CPU_IRQ_ENABLE_ON_CONFIG/DISABLE_ON_CONFIG and guard them using
CONFIG_ACRN_KEEP_IRQ_DISABLED
v3:
CONFIG_ACRN_DISABLE_INTERRUPT -> CONFIG_ACRN_KEEP_IRQ_DISABLED
Add more comment in commit message
Tracked-On: #6571
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
"idle=halt " should be avoided in REE since we have to
keep the interrupt always masked in root mode.
Tracked-On: #6571
Signed-off-by: Jie Deng <jie.deng@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Previous upstreamed patches handles the secure/non-secure interrupts in
handle_x86_tee_int. However there is a corner case in which there might
be unhandled secure interrupts (in a very short time window) when TEE
yields vCPU. For this case we always make sure that no secure interrupts
are pending in TEE's vlapic before scheduling REE.
Also in previous patches, if non-secure interrupt comes when TEE is
handling its secure interrupts, hypervisor injects a predefined vector
into TEE's vlapic. TEE does not consume this vector in secure interrupt
handling routine so it stays in vIRR, but it should be cleared because the
actual interrupt will be consumed in REE after VM Entry.
v3:
Fix comments on interrupt priority
v2:
Add comments explaining the priority of secure/non-secure interrupts
Tracked-On: #6571
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
The TEE_NOTIFICATION_VECTOR can sometimes be confused with TEE's PI
notification vector. So rename it to TEE_FIXED_NONSECURE_VECTOR for
better readability.
No logic change.
v3:
Add more comments in commit message.
Tracked-On: #6571
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Sometimes HV would like to know if there are specific interrupt
pending in vIRR, and clears them if necessary (such as in x86_tee case).
This patch adds two APIs: get_next_pending_intr and clear_pending_intr.
This patch also moves the inline api prio() from
vlapic.c to vlapic.h
v3:
Remove apicv_get_next_pending_intr and apicv_clear_pending_intr
and use vlapic_get_next_pending_intr and vlapic_clear_pending_intr
directly.
v2:
get_pending_intr -> get_next_pending_intr
apicv_basic/advanced_clear_pending_intr -> apicv_clear_pending_intr
apicv_basic/advanced_get_pending_intr -> apicv_get_next_pending_intr
has_pending_intr kept
Tracked-On: #6571
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>