Commit Graph

6301 Commits

Author SHA1 Message Date
Shuo A Liu 7efe18a84b hv: Use new struct acrn_platform_info to adapt new HSM driver
struct hc_platform_info	->	struct acrn_platform_info
MAX_PLATFORM_LAPIC_IDS	->	ACRN_PLATFORM_LAPIC_IDS_MAX

A layout change to the struct hc_platform_info is that move
max_kata_containers to back of vm_config_size,
		uint16_t max_vcpus_per_vm;
		uint16_t max_vms;
		uint32_t vm_config_size;
		uint64_t max_kata_containers;
Then, they are nature 64-bits aligned.

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2021-07-15 11:53:54 +08:00
Shuo A Liu 3deb973b7a dm: Use new ioctl ACRN_IOCTL_GET_PLATFORM_INFO
IC_GET_PLATFORM_INFO	->	ACRN_IOCTL_GET_PLATFORM_INFO
struct acrn_vm_config	->	struct acrn_vm_config_header(DM only)
struct platform_info	->	struct acrn_platform_info

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2021-07-15 11:53:54 +08:00
Shuo A Liu 82fa2d6355 dm: Rename vhm_ioctl_defs.h to hsm_ioctl_defs.h
Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2021-07-15 11:53:54 +08:00
Shuo A Liu 5a8bfff7a4 dm: return value 0 of vm_create_ioreq_client is valid
Negative return value of vm_create_ioreq_client is invalid. 0 is valid.

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-07-15 11:53:54 +08:00
Shuo A Liu 42989f753e dm: Remove header vmm.h
vmm.h has some unused definitions.

Keep the useful definitions and delete vmm.h

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-07-15 11:53:54 +08:00
Shuo A Liu 21e095dda0 dm: Remove unused vm_create_vcpu() interface
The hypervisor creates vCPUs for a User VM in VM creation interface. The
vm_create_vcpu() interface is not needed anymore.

Remove vm_create_vcpu() from acrn-dm.

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-07-15 11:53:54 +08:00
Shuo A Liu 6ae5f8388e dm: Remove the API version check
Interface version is not recommended in Linux kernel community. Please
check Documentation/driver-api/ioctl.rst for reasons.

Remove the unused API version check from acrn-dm.

Tracked-On: #6282
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-07-15 11:53:54 +08:00
David B. Kinder 24b555c75d doc: remove doc dependency on kerneldoc and acrn-kernel repo
We no longer need to generate API documentation for the upstreamed
gvt-g kernel additions so we can remove the doc generation dependency on
the acrn-kernel repo (and all use of the kerneldoc extension). We also
remove GVT-g API documentation and porting guide that are obsolete with
ACRN v2.6 and referenced this API documentation.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-07-14 18:56:07 -07:00
Yonghua Huang c4cb95f3b4 doc: Update address to report security vulnerability
acrn-security@lists.projectacrn.org shall be used.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2021-07-13 16:24:46 -07:00
Tao Yuhong ad53894fdb DM: TPM: tpm passthrough device must use fixed base GPA
The TPM driver will access some mmio registers using absolute address,
That means TPM base GPA must use same HPA value, when passthough it to VM

Tracked-On: #6126
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2021-07-05 13:18:29 +08:00
Tao Yuhong a82020839a DM: TPM2: Fix remove hard code GPA base miss control register info
CRB_REGS_CTRL_REQ is offset of control register to TPM mmio base,
need use the address to generate TPM2 acpi table

Tracked-On: #6126
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2021-07-05 13:18:29 +08:00
Kunhui-Li a8ef428b4b config_tools: fix cpu offline issue in launch script
In launch script, update cpu offline method to fix the issue
that it isn't offline cpu on ADL-S board.

Tracked-On: #6266
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-07-02 13:56:37 +08:00
Kunhui-Li e6d447e462 config_tools: update board_inspector to copy RTCT file
1. Remove acpi_template/ehl-crb-b/PTCT and acpi_template/tgl-rvp/PTCT files.
2. Update board_inspector/legacy/acpi.py script to copy RTCT file.

Tracked-On: #6238
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-07-02 13:42:06 +08:00
Sun Peng 28509b61c9 dm: Add PCI IDS for EHL/TGL/ADL in GPU passthrough
Add PCI IDS for ElkhartLake/TigerLake/AlderLake in GPU DSM and OpRegion
passthrough.

Tracked-On: #6270
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2021-07-02 09:50:05 +08:00
Shuo A Liu 9c1caad25a hv: nested: Keep privilege bits sync in shadow EPT entry
Guest may not use INVEPT instruction after enabling any of bits 2:0 from
0 to 1 of a present EPT entry, then the shadow EPT entry has no chance
to sync guest EPT entry. According to the SDM,
"""
Software may use the INVEPT instruction after modifying a present EPT
paging-structure entry (see Section 28.2.2) to change any of the
privilege bits 2:0 from 0 to 1.1 Failure to do so may cause an EPT
violation that would not otherwise occur. Because an EPT violation
invalidates any mappings that would be used by the access that caused
the EPT violation (see Section 28.3.3.1), an EPT violation will not
recur if the original access is performed again, even if the INVEPT
instruction is not executed.
"""

Sync the afterthought of privilege bits from guest EPT entry to shadow
EPT entry to cover above case.

Tracked-On: #5923
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-07-02 09:24:12 +08:00
Shuo A Liu a431cff94e hv: Use 64 bits definition for 64 bits MSR_IA32_VMX_EPT_VPID_CAP operation
MSR_IA32_VMX_EPT_VPID_CAP is 64 bits. Using 32 bits MACROs with it may
cause the bit expression wrong.

Unify the MSR_IA32_VMX_EPT_VPID_CAP operation with 64 bits definition.

Tracked-On: #5923
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2021-07-02 09:24:12 +08:00
Shuo A Liu a65e01ae95 dm: Reset virtio device before release
With virtio polling mode enabled, a timer is running in the virtio
backend service. And the timer will also be triggered if its frondend
driver didn't do the device reset in shutdown. A freed virtio device
will be accessed in the polling timer handler.

Do the virtio reset() callback specifically to clear the polling timer
before the free.

Tracked-On: #6147
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
2021-07-02 09:12:42 +08:00
David B. Kinder 4f0b86adf9 doc: fix doc reference using symbolic link
enable_s5.rst has a couple of literalinclude directives referencing
sample scripts that were moved and now go through a symbolic link to the
new folder.  Symbolic links don't work on Windows, so change the
references in enable_s5.rst to not go through the symbolic link.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-29 19:15:33 -07:00
David B. Kinder 0c52b9601a doc: update known issues list in v2.5 release notes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-28 18:16:05 -07:00
wenlingz 25a16663fa version: 2.6-unstable
Signed-off-by: wenlingz <wenling.zhang@intel.com>
2021-06-25 14:45:38 +08:00
David B. Kinder 62bad63afa doc: add 2.5 to version menu choice
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-24 21:22:23 -07:00
fuzhongl e8bd5acc8a Doc: release notes update
Adding known issue in release note.

Signed-off-by: fuzhongl <fuzhong.liu@eintel.com>
2021-06-24 19:51:39 -07:00
David B. Kinder b82b8073a9 doc: remove PTM tutorial for now
PTM feature postponed to v2.6 so remove documentation about enabling
this feature.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-24 18:53:22 -07:00
David Kinder 8d2f158d26
release notes edits (#6255)
- fix titles for fixed issues list
- edit what's new section to improve readability

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-24 16:39:32 -07:00
David B. Kinder 55644741fb doc: fix link in hardware doc
Links to UP2 Shop were incorrect

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-24 12:23:37 -07:00
David B. Kinder e60454f7b7 doc: remove obsolete tar.gz file
Delete a two-year old tar.gz file found in the tutorial folder that's no
longer needed.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-24 12:23:06 -07:00
Yifan Liu 4252bc247d misc: efi-stub: Set MOR bit before jumping to hypervisor
This patch sets the MemoryOverwriteRequestControl (MORCtrl for short)
EFI variable before jumping to hypervisor.

Setting variable MemoryOverwriteRequestControlLock (MORCtrlLock for
short) can also be enabled by manually adding -DMORCTRL_LOCK_ENABLED to
CFLAGS.

Setting MORCtrl indicates to the platform firmware that memory be
cleared upon system reset. Setting MORCtrlLock for the first time will
render both MORCtrl and MORCtrlLock to read-only, until next reset.

Tracked-On: #6241
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu c2217aa5d4 misc: efi-stub: Implement modules loading in container
This patch implements the container_load_modules function.
This function loads multiboot modules following multiboot protocol.

Tracked-On: #6241
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu e0f69399ff misc: efi-stub: Implement boot image loading in container
This patch implements the container_load_boot_image function.
This function loads boot image following multiboot protocol.

Tracked-On: #6241
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu daa42752d2 misc: efi-stub: Add barebone container as an implementation of HV_LOADER
Previous patches introduces an abstract struct HV_LOADER to do two
things: load boot image and load boot modules. This patch provides an
implementation barebone of container. The implementation of critical
functions container_load_boot_image and container_load_modules will come
in coming patches.

Tracked-On: #6241
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu e32640aab6 misc: efi-stub: Add helper functions to parse/load ELF32 image
This patch adds a file containing some helper functions to load
or validate ELF32 images.

Tracked-On: #6241
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu 6cb667f137 misc: efi-stub: Add helper functions to search/parse multiboot1/2 headers
This patch adds a file containing some helper functions to search or parse
multiboot headers.

Tracked-On: #6241
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu 8c45359170 misc: efi-stub: Prepare multiboot1 info for HV
This patch adds code to prepare multiboot1 info passed to hypervisor.

Tracked-On: #6241
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu f3d1823754 misc: efi-stub: Prepare multiboot2 info for HV
This patch adds code to prepare multiboot2 info passed to hypervisor.
Currently we prepare only the following information to hypervisor:
    Boot command line
    Boot loader name
    Modules
    Memory Map
    ACPI table
    EFI64 system table
    EFI memory map

Tracked-On: #6241
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
2021-06-24 14:42:56 +08:00
Yifan Liu 52790b5c0e misc: efi-stub: Barebone efi-stub for secure boot
ACRN EFI application based on the legacy efi-stub code provides booting method
of HV on UEFI-BIOS without using the GRUB Bootloader. It is supposed to be used
for secure booting on certain platform. By means of that users can boot HV,
Service VM kernel, pre-launched VM kernel and its ACPI table binary packed in
the Slim Bootloader container boot image file format. ACRN EFI application has
additional dependencies to compile which are not listed in the existing ACRN GSG
doc. Since this is an optional feature but not all users need, it does not get
compiled by default to avoid causing any confusion for existing users. README
for how to use the feature will come later in a separated commit.

This patch adds barebone implementation of this efi-stub. The following
files are reused from a previous version of efi-stub without changes:
    efilinux.h, pe.c, stdlib.h

Other files contains stubbed functions, whose implementation will come
in coming patches.

Tracked-On: #6241
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Co-developed-by: Yifan Liu <yifan1.liu@intel.com>
2021-06-24 14:42:56 +08:00
David B. Kinder fd7f0e2c45 doc: update v2.5 release notes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-23 20:23:28 -07:00
Kunhui-Li 25c677dc39 doc: fix documentation's issue
1. Update the necessary libraries to consistent with the "Build ACRN From Source"
document in the "Getting Started Guide" document.
2. Delete the related introduction with acrngt.conf and launch_uos_id1.sh files in
"Getting Started Guide" document.
3. Update WHL-IPC-I7 board's processor in Supported HW document.
4. Add cpu_affinity element's description in ACRN Configuration Data.
5. Update the description for shm_region in Launch XML format.
6. Update configurable/readonly attributes values.
7. Update the description for hv.CAPACITIES.MAX_MSIX_TABLE_NUM in schema/config.xsd.

Tracked-On: #5692
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-06-23 19:25:22 -07:00
David B. Kinder 00fbe949df doc: update v2.5 release notes highlights
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-23 19:23:46 -07:00
Zide Chen 9dc43de733 doc: update nested virtualization user guide
Tracked-On: #5923
Signed-off-by: Zide Chen <zide.chen@intel.com>
2021-06-23 13:43:15 -07:00
David B. Kinder 6cd8bcafdc doc: edit efi-stub tutorial
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-23 09:06:02 -07:00
Nishioka, Toshiki 5fffcdcbd9 doc: add acrn efi-stub user guide
Add user guide for ACRN EFI application for Secure Boot.

Tracked-On: #6078
Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
2021-06-23 09:00:32 -07:00
David B. Kinder 8e7f1dbac8 doc: release notes edits
Fix some minor formatting/layout issues and wording

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-22 18:49:33 -07:00
Junjie Mao a9af948993 doc: update release notes for v2.5 on configuration upgrades
This patch updates recommendations to upgrade from a prior ACRN version for
v2.5.

v2:
 * Apply suggestions from review.
 * Remove descriptions on the scenario XML upgrade tool.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-06-22 18:39:25 -07:00
Yonghua Huang 5399602d5a doc: update security advisory for 2.5 release
update fixed security vulnerabilities for 2.5 release.

Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-22 10:06:43 -07:00
David B. Kinder bc20d0c423 doc: fix broken links in redirect list
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-21 22:46:23 -07:00
David B. Kinder ccb1bf18dc doc: update changed does in release notes
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-21 15:55:44 -07:00
David B. Kinder e2c9bdb8ca doc: resove conflicting edits to supported hardware
Resolve different edits to the supported hardware doc from
PRs #6228 and #6229

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-21 14:53:39 -07:00
David B. Kinder f3dd19dea7 doc: fix renaming of getting started guide
Tweak references to account for renaming the getting started guide in
PR #6226 and create a redirect link from the previous filename.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2021-06-21 13:48:34 -07:00
Geoffroy Van Cutsem 6b6efed7eb doc: updates to the Getting Started Guide
Updates to the Getting Started Guide:
* Update title to simply be "Getting Started Guide"
* Simplify and remove instructions that are redundant
* Add a note explaining the difference between 'nuc11tnbi5' and
  'nuc11tnhi5'

Tracked-On: #6225
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-06-21 11:24:12 -07:00
Geoffroy Van Cutsem 8f8fe5c18c doc: update the "Supported Hardware" document
Update the ACRN documentation with regards to the supported HW:
* Remove outdated reference to Apollo Lake and Kaby Lake
* Re-order HW platforms in "Supported HW" to be consistent throughout
  the document
* Use the '|copy|' and '|trade|' replacements
* Update the recommendation for creating nnon-existant $(BOARD).xml

Tracked-On: #6227
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-06-21 07:57:00 -07:00