Commit Graph

5601 Commits

Author SHA1 Message Date
dongshen ef9a961523 acrn-config/hv: create new file pt_intx_c.py to generate the pt_intx.c file
Move struct pt_intx_config vm0_pt_intx[] defintion to pt_intx.c
so that vm_configurations.h/vm_configurations.c are consistent for different boards

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
dongshen 0f0d0c0d18 acrn-config: always generate P2SB_BAR_ADDR related boilerplate code in vm_configurations.c
so that vm_configurations.h/vm_configurations.c are consistent for different boards

The boilerplate code is protected by #ifdef P2SB_BAR_ADDR/#endif, so it will
not hurt if we always produce related code.

Define new macros P2SB_BAR_ADDR_GPA and P2SB_BAR_SIZE to make the code more flexible.

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
dongshen 14a3abcce0 acrn-config: always generate pt_tpm2 boilerplate code in vm_configurations.c
so that vm_configurations.h/vm_configurations.c are consistent for different boards

The boilerplate code is protected by #ifdef VM0_PASSTHROUGH_TPM/#endif, so it will
not hurt if we always produce related code.

Define a new macro VM0_TPM_BUFFER_BASE_ADDR_GPA to define the allocated gpa for VM0_TPM_BUFFER_BASE_ADDR
to make the code more flexible.

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
dongshen f438ab5a04 acrn-config: always generate .clos boilerplate code in vm_configurations.c
so that vm_configurations.h/vm_configurations.c are consistent for different boards

The boilerplate code is protected by #ifdef CONFIG_RDT_ENABLED/#endif, so it will
not hurt if we always produce the .clos code.

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
dongshen 9f43d200d6 acrn-config: define VMx_BOOT_ARGS macros in misc_cfg_h.py
so that vm_configurations.h/vm_configurations.c are consistent for different boards

Debugged and refactored the split_cmdline() function

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
dongshen 0e92ecf35d acrn-config: move VMx_CONFIG_PCI_DEV_NUM macro to misc_cfg_h.py
so that vm_configurations.h/vm_configurations.c are consistent for different boards

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
dongshen ba0e466618 acrn-config: move cpu affinity macro to misc_cfg_h.py
so that vm_configurations.h/vm_configurations.c are consistent for different boards

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
dongshen 0ad3dd4654 acrn-config: use ordered dictionary to guarantee dict order
For python versions prior to 3.7, dict order is not guaranteed.

Use ordered dict to ensure consistent ordering for the same input,
otherwise, the generated config files may change every time the config tool runs

Fix some error messages in code/comment

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-16 10:37:09 +08:00
David B. Kinder 30ac42c18e doc: edit intro grammar
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-15 16:57:08 -07:00
David B. Kinder 8133ffad2e doc: continue CL cleanup
Removed additional references to Clear Linux

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-15 14:45:22 -07:00
David B. Kinder 1509826a29 doc: update pre-launched VMs with offline ACPI
Bring change made to release_2.2 branch back to the main (master)
branch.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-15 09:09:23 -07:00
Victor Sun c63899fc81 HV: correct hpa calculation for pre-launched VM
The commit of da81a0041d
"HV: add e820 ACPI entry for pre-launched VM" introduced a issue that the
base_hpa and remaining_hpa_size are also calculated on the entry of 32bit
PCI hole which from 0x80000000 to 0xffffffff, which is incorrect;

Tracked-On: #5266

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-09-15 09:45:10 +08:00
Yuan Liu fe722ba085 dm: refine ivshmem usage interface
Change shared memory name prefix from sos to dm
Change shared memory size unit from byte to megabyte

Tracked-On: #4853

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-15 09:41:43 +08:00
Yuan Liu 12557d2e2b doc: add ivhshmem hv-land introduction
Ivshmem hv-land solution emulates the ivshmem device in hypervisor
and the shared memory is reserved in the hypervisor's memory space.
And it can provide inter-vm communication for both pre-launched and
post-launched VMs.

This patch introduces the ivshmem hv-land solution including what
ivshmem hv-land is and how to use it.

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
2020-09-14 10:20:39 -07:00
Peter Fang 3dff03eb66 OVMF release v2.2
- GvtGopDxe: Adjust the offset of gop in pvinfo page

Tracked-On: #5303
Signed-off-by: Peter Fang <peter.fang@intel.com>
2020-09-14 16:28:59 +08:00
Shuang Zheng f9b9e3cae5 acrn-config: increase the length of DSDT table
increase the length of DSDT table to avoid memory overwrited by
subsequent ACPI tables.

Tracked-On: #5266

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-14 16:02:17 +08:00
Shuang Zheng b7e4c69374 acrn-config: add OTN1 device config in offline ACPI table
add TSN device OTN1 config into offline ACPI table for TSN device
passthrough to pre-launched RTVM.

v2) update TSN device list from bdf list to vid:pid list.

Tracked-On: #5266

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-14 16:02:17 +08:00
Shixiong Zhang c798145478 acrn-config: remove uuid in config
Use vm_type to configure the load_type/uuid/severity,
Delete uuid lines in config scenario.

Tracked-On: #4641

Signed-off-by: Shixiong Zhang <shixiongx.zhang@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2020-09-14 15:49:44 +08:00
Shuang Zheng 70861b35b9 acrn-config: fix issue of acrn build failed on industry scenario when ivshmem configured
add extern acrn_vm_pci_dev_config variables in vm_configuration.c
when ivshmem configured on scenarios with ivshmem configured.

Tracked-On: #5298

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-14 15:26:06 +08:00
Geoffroy Van Cutsem 557704458e doc: fix source code folder and use 'User VM'
Fix the folder name where the 'acrn-manager' source code is located.
Replace instances of 'UOS' by 'User VM'
Other minor text updates to improve readability

Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-09-10 11:39:58 -07:00
Shuang Zheng 05393ef43f acrn-config: upload generated ASL code of ACPI tables for pre-launched VMs
generate ASL code of ACPI tables for pre-launched VMs on nuc7i7dnb,
whl-ipc-i5, whl-ipc-i7, ehl-crb-b boards

Tracked-On: #5266

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2020-09-10 13:50:19 +08:00
Sun Peng 60df242643 dm: uart: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng fd671047ed dm: blockif: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 31a9525fa8 dm: ioc: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng c655313abd dm: timer: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 7beed5ca8a dm: tpm: Convert print output to acrn-dm logger
Refine the DPRINTF/WPRINTF to pr_* based log interface for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng db53212132 dm: rbmp: Convert print output to acrn-dm logger
Refine the DPRINTF/WPRINTF to pr_* based log interface for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 2d2d5e6e28 dm: usb: Convert print output to acrn-dm logger
Refine the UPRINTF to pr_* based log interface for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 3f37fabc2e dm: pci_passthrough: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng ac6111080c dm: npk: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 6a3816c289 dm: gvt: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 2a81061aae dm: gsi: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 62c9745765 dm: pci_core: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 72dbac0448 dm: ahci: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 00a739cf32 dm: virtio: Convert console print output to acrn-dm logger
Refine the DPRINTF/WPRINTF to pr_* based log interface instead of printf directly.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng 7414a237b4 dm: mmio: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
Sun Peng a567cbf12f dm: core: Convert print output to acrn-dm logger
Unifies the logs to pr_* interfaces instead of printf for better log management.

Tracked-On: #5267
Signed-off-by: Sun Peng <peng.p.sun@intel.com>
Reviewed-by: Chi Mingqiang <mingqiang.chi@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
2020-09-10 09:33:25 +08:00
David B. Kinder d7e34acfe1 doc: add pointers to meta-acrn layer repo docs
meta-acrn is a Yocto Project layer repo with recipes for building a
Service and User VM OS using Yocto Project.  While the information there
is sparse, for the experienced YP developer is might be enough.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-09 08:19:31 -07:00
Victor Sun 8b86714af8 HV: fix uart hang issue caused by bdf overridden
On a PCI type HV uart, the bdf value is in a union together with
mmio_base_vaddr, then the value would be overridden by mmio_base_addr
in uart16550_init(), result in is_pci_dbg_uart() returns a wrong value
and then uart hang.

Tracked-On: #5288

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-09-09 10:10:06 +08:00
Shuang Zheng feb0772a53 acrn-config: enable TPM2 config on ehl-crb-b board
enable TPM2 config on ehl-crb-b board and update TPM2 configs on
legacy boards.

Tracked-On: #5266

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2020-09-09 09:52:21 +08:00
Tao Yuhong 85e6e5516d config: EHL passthough network to pre-launched VM for hybrid_rt
For EHL hybrid_rt scenario, the requirement needs a network device
passthough to pre-launched VM0.

Tracked-On: #5286
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-09 09:33:51 +08:00
Shixiong Zhang f180397186 acrn-config: add MACROs for mmcfg bus number
add 2 MACROs: DEFAULT_PCI_MMCFG_START_BUS and DEFAULT_PCI_MMCFG_END_BUS
in platform_acpi_info.h.

Tracked-On: #5233

Signed-off-by: Shixiong Zhang <shixiongx.zhang@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-09 09:31:56 +08:00
Shixiong Zhang dc16acb9d3 acrn-config: add MACROs for mmcfg bus number
add 2 MACROs: DEFAULT_PCI_MMCFG_START_BUS and DEFAULT_PCI_MMCFG_END_BUS
in platform_acpi_info.h.

Tracked-On: #5233

Signed-off-by: Shixiong Zhang <shixiongx.zhang@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-09 09:31:56 +08:00
Li Fei1 a2fd8c5a9d pci: mcfg: limit device bus numbers which could access by ECAM
Per PCI Firmware Specification Revision 3.0, 4.1.2. MCFG Table Description:
Memory Mapped Enhanced Configuration Space Base Address Allocation Structure
assign the Start Bus Number and the End Bus Number which could decoded by the
Host Bridge. We should not access the PCI device which bus number outside of
the range of [Start Bus Number, End Bus Number).
For ACRN,  we should:
1. Don't detect PCI device which bus number outside the range of
[Start Bus Number, End Bus Number) of MCFG ACPI Table.
2. Only trap the ECAM MMIO size: [MMCFG_BASE_ADDRESS, MMCFG_BASE_ADDRESS +
(End Bus Number - Start Bus Number + 1) * 0x100000) for SOS.

Tracked-On: #5233

Signed-off-by: Li Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-09-09 09:31:56 +08:00
Shuang Zheng 03036062cd makefile: compile ACPI tables for pre-launched VMs to one binary
compile ACPI tables for pre-launched VMs to one binary when pre-build
hypervisor.

Tracked-On: #5266

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-08 19:52:25 +08:00
Shuang Zheng c059a3264d acrn-config: add TPM2 config for pre-launched VMs
add TPM2 config for Pre-launched VMs

Tracked-On: #5266

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-08 19:52:25 +08:00
Shuang Zheng 061091a489 acrn-config: offline tool to generate ACPI tables for pre-launched VMs
use offline tool to generate one binary of ACPI tables for pre-launched
VMs, then load the ACPI binary into guest physical memory as grub module.
Users can configure the resources or devices like TPM2 for the
pre-launched VM from sceanrio XMLs or UI, and the offline tool will
generate ASL code of the ACPI tables with the configured resources or
devices, then compile the ASL code to one binary when building ACRN.

Tracked-On: #5266

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-08 19:52:25 +08:00
Victor Sun 2c0bc146ce HV: remove deprecated vacpi build method
The old method of build pre-launched VM vacpi by HV source code is deprecated,
so remove related source code;

Tracked-On: #5266

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-09-08 19:52:25 +08:00
Victor Sun 34547e1e19 HV: add acpi module support for pre-launched VM
Previously we use a pre-defined structure as vACPI table for pre-launched
VM, the structure is initialized by HV code. Now change the method to use a
pre-loaded multiboot module instead. The module file will be generated by
acrn-config tool and loaded to GPA 0x7ff00000, a hardcoded RSDP table at
GPA 0x000f2400 will point to the XSDT table which at GPA 0x7ff00080;

Tracked-On: #5266

Signed-off-by: Victor Sun <victor.sun@intel.com>
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-09-08 19:52:25 +08:00
Victor Sun 4290a79951 HV: refine get multiboot module API
change API of
uint32_t get_mod_idx_by_tag(const struct multiboot_module *mods,
			    uint32_t mods_count,
			    const char *tag)
to
struct multiboot_module *get_mod_by_tag(const struct acrn_multiboot_info *mbi,
					const char *tag)

to simplify caller interface;

Tracked-On: #5266

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-09-08 19:52:25 +08:00