Commit Graph

616 Commits

Author SHA1 Message Date
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
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
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
Toshiki Nishioka 0da42dc1dd acrn-config: add swiotlb to sos kernel bootargs to increase bounce bufs
EHL PSE TSN GbE driver is default set to use 32bit of dma addressing.

net: stmmac: configure PSE Gbe to 32bit dma addressing
https://github.com/intel/linux-intel-lts/commit/011c8f

When VM has more than 4GB physical memory, Linux kernel uses the bounce
buffers (swiotlb) to translate kernel data in 64bit memory to 32bit
range for the sake of the DMA because iommu is not available. The
default swiotlb value 32768 is insufficient to support two PSE TSN GbEs
at the same time. Increase the value to 131072 otherwise two GbEs can't
link up.

Tracked-On: #5243

Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-08 15:40:49 +08:00
Shuang Zheng f4a5b7fc68 acrn-config: fix the issue of failure to create a new launch setting.
When creating a new launch setting, config app can't fine the
scenario config which caused the app failed to load the new
launch setting.

Tracked-On: #5282

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2020-09-08 14:57:49 +08:00
Geoffroy Van Cutsem c4815f1c98 acrn-manager: build and install 'acrnctl' (release and debug)
Build and install 'acrnctl' for regardless of the RELEASE value. Kata Containers
depends on 'acrnctl' in order to work correctly and we therefore need to make
sure that it is built and installed correctly regardless of whether this is a
debug or a release build.

Tracked-On: #4940
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-09-08 14:05:04 +08:00
Toshiki Nishioka cdd01db4e7 acrn-config: add hybrid_rt_fusa scenario for fusa related passthru test
Add a new scenario xml file for EHL which is derived from hybrid_rt for
validation of certain passthru devices in prelaunched RTVM. Because the
configuration requires to disable GPIO support for SOS VM, it should
not be merged into the standard hybrid_rt scenario. According to this
change, remove the SCI passthru setting from existing hybrid_rt since
from now on hybrid_rt_fusa should be used for SCI passthru test.

Tracked-On: #5278

Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-08 10:22:31 +08:00
Shuang Zheng 84c4c43833 acrn-config: fix csme passthrough issue for launch setting
minor_ver should be le 2 when major_ver == 2.

Tracked-On: #5276

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-07 16:42:56 +08:00
Shuang Zheng 28ba2c8940 acrn-config: update the size range of ivshmem memory region
update the size of ivshmem memory region to [2MB, 512MB].

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Yuan Liu <yuan1.liu@intel.com>
2020-09-07 14:55:49 +08:00
Toshiki Nishioka 19f74d84a6 acrn-config: refine p2sb mmio pass-thru macro definitions
Always use P2SB_ as a prefix for all macro definitions related to P2SB
MMIO passthru. And introduce the new P2SB_VGPIO_DM_ENABLED macro to
indicate the presence of the pre-launched VM which requires the feature.
This macro intends to be used to enclose source files with ifdef where
macros defined by config-tool being used which are available only when
the feature is enabled. It is required to avoid causing compilation
errors when users build HV without enabling the feature.

Tracked-On: #5246

Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-09-07 14:52:02 +08:00
Toshiki Nishioka 64efb36c0e acrn-config: add pse-gpio to vmsix_on_msi devices list
Two PSE-GPIO controllers of EHL CRB require MSI-X emulation for
pass-thru because it uses multiple MSI vectors. Currently acrn-config
enables MSI-X emulation for only TSN devices. Enable MSI-X emulation
for PSE-GPIOs, too.

Tracked-On: #5242

Signed-off-by: Toshiki Nishioka <toshiki.nishioka@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-03 13:48:27 +08:00
Victor Sun 810cf330e9 acrn-config: zephyr entry and load address update
After below commit in https://github.com/zephyrproject-rtos/zephyr

commit d0126a037d23484feebba00d2c0eac27e6393fef
Author: Zide Chen <zide.chen@intel.com>
Date:   Wed Feb 5 08:32:00 2020 -0800

    boards/x86/acrn: build it in x86_64 mode and switch to X2APIC

The zephyr image for acrn would be built in x86_64 mode by default, then the
load/entry address for pre-launched Zephyr image should be changed from
0x100000 to 0x8000 accordingly per below definition in zephyr .ld file:

zephyrproject_src/zephyr/include/arch/x86/intel64/linker.ld

SECTIONS
{
	/*
	 * The "locore" must be in the 64K of RAM, so that 16-bit code (with
	 * segment registers == 0x0000) and 32/64-bit code agree on addresses.
	 * ... there is no 16-bit code yet, but there will be when we add SMP.
	 */

	.locore 0x8000 : ALIGN(16)
	{
	_locore_start = .;

The commit in zephyrproject is merged before zephyr v2.2 release, so from v2.2
on, HV need this fix to boot Zephyr as pre-launched VM.

Tracked-On: #5259

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-09-02 11:04:20 +08:00
Tw 42567c9a1c script: fix a minor bug in launch_xenomai.sh
There a bug in substring detection, fix it.

Tracked-On: #5183
Signed-off-by: Tw <wei.tan@intel.com>
2020-09-02 10:31:10 +08:00
David B. Kinder 54975e4629 doc: remove docs referencing Clear Linux
ACRN 2.1 supports two virtual boot modes, deprivilege boot mode and
direct boot mode. The deprivilege boot mode’s main purpose is to support
booting Clear Linux Service VM with UEFI service support, but this
brings scalability problems when porting ACRN to new Intel platforms.
For the 2.2 release, deprivilege mode is removed, and only direct boot
is supported, and with this we've removed support for Clear Linux as the
service VM, which impacts over 50 ACRN documents.  This PR removes
documents we don't intend to update, and fixes broken links that would
occur from references to these deleted docs.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-09-01 11:46:41 -07:00
Wei Liu 6ddf793f16 acrn-config: convert SERIAL_PCI_BDF string value to hex value
Convert SERIAL_PCI_BDF string value to hex value.

Tracked-On: #4937
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Tested-by: Shuo A Liu <shuo.a.liu@intel.com>
2020-09-01 15:13:53 +08:00
Shuang Zheng 9af694dfbc acrn-config: add ivshmem config in launch setting
Users can add one or more ivshmem shm regions for uos when the shm
regions are configured from scenario setting.

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-01 09:56:51 +08:00
Shuang Zheng 1ef1ebe4e9 acrn-config: update launch xmls for Inter-VM commnication config
add shm_region config in default launch XMLs to configure Inter-
VM communication for post-launched VMs.

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-01 09:56:51 +08:00
dongshen 5c32fa610d acrn-config: expose GPIO chassis interrupt to safety VM as INTx
This patch is to expose GPIO chassis interrupts as INTx to safety VM for
EHL. User can configure this per-VM attribute in scenario xml using the
following format:
<pt_intx desc="pt intx mapping.">
  	(phys_gsi0, virt_gsi0), (phys_gsi1, virt_gsi1), (phys_gsiN, virt_gsiN)
 </pt_intx>

The physical and virtual interrupt gsi in each pair are separated by a
comma and enclosed in parentheses. If an integer begins with 0x or 0X,
it is hexadecimal, otherwise, it is assumed to be decimal. Example:
  <pt_intx desc="pt intx mapping.">
  	(1, 0), (0x3, 1), (0x4, 2), (5, 6), (89, 0x12)
  </pt_intx>

Tracked-On: #5241
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-01 09:35:50 +08:00
dongshen 01c66eb4b3 acrn-config: add support for P2SB bridge passthrough
This patch is to support direct assignment of P2SB bridge to one pre-launched
VM for EHL. User can configure this per-VM attribute in scenario xml:
    <mmio_resources desc="MMIO resources.">
         <p2sb>y</p2sb>
    </mmio_resources>

Set p2sb to y to passthru P2SB bridge to VM, and n otherwise.

Tracked-On: #5221
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-01 09:35:50 +08:00
dongshen 678d8c1665 acrn-config: fix build issue for mrb board
Add missing IVSHMEM tag in mrb board xml file to fix build issue

Correct misspelled function name

Use better error messages

Tracked-On: #5221
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-09-01 09:35:50 +08:00
Shuang Zheng 58a71b67ab acrn-config: make HV_RAM_SIZE include IVSHMEM_SHM_SIZE
Because ivshmem memory uses hv memory, if the ivshmem feature is
enabled, HV_RAM_SIZE will include IVSHMEM_SHM_SIZE.

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-01 09:35:16 +08:00
Nishioka, Toshiki 57ce23034c acrn-config: add hybrid_rt scenario xml config for ehl-crb-b
add hybrid_rt scenario for the ElkhartLake CRB board so that user can
launch Yocto Linux as pre-launched VM.

Tracked-On: #5238

Signed-off-by: "Nishioka, Toshiki" <toshiki.nishioka@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-09-01 09:01:52 +08:00
Wei Liu 52bb9d6983 acrn-config: add .clos to vm_configurations.c
1.Create board files for ehl-crb-b
2.Add .clos to vm_configurations.c

Tracked-On: #5229
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-08-28 16:44:06 +08:00
Wei Liu 29ac258134 acrn-config: code refactoring for CAT/MBA
1.Modify clos_mask and mba_delay as a member of the union type.
2.Move HV_SUPPORTED_MAX_CLOS ,MAX_CACHE_CLOS_NUM_ENTRIES and
MAX_MBA_CLOS_NUM_ENTRIES to misc_cfg.h file.

Tracked-On: #5229
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-08-28 16:44:06 +08:00
Wei Liu 7eb103478a acrn-config: add MAX_CACHE_CLOS_NUM_ENTRIES/MAX_MBA_CLOS_NUM_ENTRIES macros
1.Add macro MAX_CACHE_CLOS_NUM_ENTRIES for CAT, and MAX_MBA_CLOS_NUM_ENTRIES for MBA.

 MAX_MBA_CLOS_NUM_ENTRIES:
  Max number of Cache Mask entries corresponding to each CLOS.
  This can vary if CDP is enabled vs disabled, as each CLOS entry will have corresponding
  cache mask values for Data and Code when CDP is enabled.

 MAX_CACHE_CLOS_NUM_ENTRIES:
  Max number of MBA delay entries corresponding to each CLOS.

2.Move VMx_VCPU_CLOS macro to misc_cfg.h head file.

Tracked-On: #5229
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-08-28 16:44:06 +08:00
dongshen a425730f64 acrn-config: rename MAX_PLATFORM_CLOS_NUM to HV_SUPPORTED_MAX_CLOS
HV_SUPPORTED_MAX_CLOS:
 This value represents the maximum CLOS that is allowed by ACRN hypervisor.
 This value is set to be least common Max CLOS (CPUID.(EAX=0x10,ECX=ResID):EDX[15:0])
 among all supported RDT resources in the platform. In other words, it is
 min(maximum CLOS of L2, L3 and MBA). This is done in order to have consistent
 CLOS allocations between all the RDT resources.

Tracked-On: #5229
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
2020-08-28 16:44:06 +08:00
Wei Liu 3674179701 acrn-config: add MMIO type for debug UART
Tracked-On: #4937
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-08-27 13:31:17 +08:00
Shuang Zheng 0c07999ec2 acrn-config: add IVSHMEM config in hybrid_rt of tgl-rvp
add IVSHMEM config in hybrid_rt scenario on tgl-rvp board.

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-27 09:02:56 +08:00
Shuang Zheng ae6e107d9c acrn-config: add maxcpus to sos kernel cmdline in hybrid scenario
We use sos kernel cmdline maxcpus to limit the pCPU number of SOS
for hybrid or hybrid_rt scenarios by vcpu numbers calculation.

v2: add SOS CPU affinity calculation by total pCPU plus pCPUs
    occupied by pre-launched VMs when no pcpuid configured
    in SOS.

Tracked-On: #5216

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2020-08-27 08:56:44 +08:00
zhanqi 75ecc0e3b1 misc/packaging: remove efi support
Tracked-On: #5022

Signed-off-by: zhanqi <sherry.qi.zhang@intel.com>
2020-08-26 16:29:27 +08:00
Victor Sun 7935354864 acrn-config: add cfl-k700-i7 industry xmls
Add cfl-k700-i7 board xml and its industry xml to support ACRN industry
scenario on cfl-k700-i7 board.

Tracked-On: #5212

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-08-26 13:46:56 +08:00
Shuo A Liu 62287cdb48 acrn-config: Enable pre-launch VM sharing CPU with other VMs
CPU sharing between pre-launch VMs and SOS, post-launch VMs were
forbidden.

Remove the limitation.

Tracked-On: #5153
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-08-26 08:49:41 +08:00
Shuang Zheng e46c5ac350 acrn-config: support configuration for Inter-VM communication
This patch is to support the Inter-VM communication by IVSHMEM
in config tool.
Users can configure IVSHMEM_ENABLE to enable or disable Inter-VM
communication by IVSHMEM; users can configure the name, size,
communication VM IDs of the IVSHMEM devices in the VM settings of
scenario xmls, then config tool will generate the related IVSHMEM
configurations for Inter-VM communication.
The config tool will do sanity check including when saving the xmls:
the format of shared memory region configuration is
[name],[size],[VM ID]:[VM ID](:[VM ID]...);
the max size of the name is 32 bytes;
the names should not be duplicated;
the mininum value of shared memory region size is 2M;
the value of shared memory region is a power of 2;
the size of share memory region should not extended the size of
available ram.

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-24 13:58:38 +08:00
Shuang Zheng 4665a17f72 acrn-config: add inter-vm config in config app
Shared memory regoins can be added or deleted or updated from
scenario settings in config app  with sanity check.

v2: move IVSHMEM config to hv->FEATURES->IVSHMEM

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-24 13:58:38 +08:00
Shuang Zheng 9d27ec2df0 acrn-config: update config xmls to add Inter-VM configs
add IVSHMEM_ENABLED and IVSHMEM_REGION in scenario xmls to support
Inter-VM communications configuration for VMs.

v2: move IVSHMEM config into <FEATURES> section

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-24 13:58:38 +08:00
zhanqi 735619f5c2 misc:update packaging tool,add pre-check scripts/ add patch function /optimize
Tracked-On: #5022

Signed-off-by: zhanqi <sherry.qi.zhang@intel.com>
2020-08-24 09:12:45 +08:00
Tao Yuhong 54f6a6e221 TGL: pre-launched VM0 tpm passthrough
Enable TPM passthrough configuration for pre-launched VM feature, on
TGL, by adding 'tgl-rvp' to TPM_PASSTHRU_BOARD.

Tracked-On: #5205
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2020-08-22 17:45:38 +08:00
Shuang Zheng e6c1b89ffa acrn-config: get the max number with integer list
Get the max number with integer list to instead string 'number'.

Tracked-On: #5199

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-22 17:42:22 +08:00
Tao Yuhong 2a6ab5f4ea acrn-config: add hybrid_rt scenario xml config for TGL
Add ./misc/acrn-config/xmls/config-xmls/tgl-rvp/hybrid_rt.xml

Tracked-On: #5185
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
2020-08-21 14:41:29 +08:00
fuzhongl 5409d14e08 acrn-config: update TGL platform and SOS RAM size
The default memory is 16G on TGL; the value of PLATFORM_RAM_SIZE and
SOS_RAM_SIZE is a little small in default xml.

Tracked-On: #5184
Reviewed-by: Victor Sun  <victor.sun@intel.com>
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-08-20 10:06:31 +08:00
Shuang Zheng c26ae8c420 hv: Inter-VM communication config for hybrid_rt on whl-ipc-i5
add an IVSHMEM regoin and the related configuration parameters in
hybrid_rt scenario on whl-ipc-i5. The size of the shared memory is
2M, and it is used for the communication between VM0 and VM2.

v6: rename shm name; remove unnecessary MACROs.

v7: rename MACRO for shm name; add unassigned vbdf for post-launched
    VMs.

Tracked-On: #4853

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-08-19 15:06:15 +08:00
Wei Liu 088cd62d8b HV: sync hv reference code that generated by config tool
Sync hv reference code that generated by acrn-config tool.

Tracked-On: #5092
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-08-17 14:34:30 +08:00
Wei Liu 01362c3cd1 acrn-config: fix build issue while CDP_ENABLED=y
Fix build issue while CDP_ENABLED=y for EHL-CRB-B.

Tracked-On: #5092
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-17 14:34:30 +08:00
fuzhongl 5e07e99dcc MISC: Update HV and SOS ramsize in TGL xml
The default memory is 16G on TGL; the value of HV and sos
ramsize is a little small in default xml.

Tracked-On: # 5184
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
2020-08-14 14:54:53 +08:00
Victor Sun 05a083c944 HV: comment SOS_VM as VMx in vm_configurations.h
Add a comment for SOS_VM to indicate its VM ID for better understanding;

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-08-13 13:48:17 +08:00
lirui34 b04fba2db5 acrn-config: set CONFIG_MAX_MSIX_TABLE_NUM to 16 in the qemu sdc xml
when CONFIG_MAX_MSIX_TABLE_NUM was set to 64, it will trigger timeout ASSERT
on WHL-I5 board.

Tracked-On: #5178

Signed-off-by: lirui34 <ruix.li@intel.com>
2020-08-13 09:34:01 +08:00
Victor Sun b5dfe369da HV: move vm configuration check to pre-build time
This patch will move the VM configuration check to pre-build stage,
a test program will do the check for pre-defined VM configuration
data before making hypervisor binary. If test failed, the make
process will be aborted. So once the hypervisor binary is built
successfully or start to run, it means the VM configuration has
been sanitized.

The patch did not add any new VM configuration check function,
it just port the original sanitize_vm_config() function from cpu.c
to static_checks.c with below change:
  1. remove runtime rdt detection for clos check;
  2. replace pr_err() from logmsg.h with printf() from stdio.h;
  3. replace runtime call get_pcpu_nums() in ALL_CPUS_MASK macro
     with static defined MAX_PCPU_NUM;
  4. remove cpu_affinity check since pre-launched VM might share
     pcpu with SOS VM;

The BOARD/SCENARIO parameter check and configuration folder check is
also moved to prebuild Makefile.

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-08-12 10:21:17 +08:00
Victor Sun 3cd5abe5ac acrn-config: add cpu_affinity for SOS VM
Add cpu_affinity setup for SOS VM. Cpu affinity must be set in
scenario XML, except if no pre-launched VM on the scenario and
all pCPUs will be assigned to SOS VM in that case;

Tracked-On: #5077
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-08-04 09:05:29 +08:00
Victor Sun b9ad04d24d HV: add cpu affinity info for SOS VM
Previously the CPU affinity of SOS VM is initialized at runtime during
sanitize_vm_config() stage, follow the policy that all physical CPUs
except ocuppied by Pre-launched VMs are all belong to SOS_VM. Now change
the process that SOS CPU affinity should be initialized at build time
and has the assumption that its validity is guarenteed before runtime.

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-08-04 09:05:29 +08:00
Wei Liu 1ed214015c HV: set guest flag value for logical partition
Set guest flag value for logical partition.

Tracked-On: #5119
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-03 08:36:56 +08:00
Wei Liu 922696de7e acrn-config: remove RT guest flag configuration
Remove RT guest flags from logical partition
configuration.

Tracked-On: #5119
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-08-03 08:36:56 +08:00
Shuang Zheng 8191e1143a acrn-config: update config app with new xml folder
The folders for config xmls and scenario setting source code are moved
to misc/vm_configs/xmls and misc/vm_configs/board, misc/vm_configs/scenario,
so this patch is to update config path for these folders.

Tracked-On: #5077
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 72dab3f9dc acrn-config: refactor xmls/samples folder for acrn-config
Add xmls/samples folders under misc/vm_configs, and make soft link for
them.

Tracked-On: #5077
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 1210837a87 acrn-config: add sdc/logical_partition/hybrid xmls configs for TGL
Add sdc/logical_partition/hybrid xmls configs for TGL.

Tracked-On: #5095
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 8039e7c693 acrn-config: update board xml for TGL
Update board xml for TGL.

Tracked-On: #5094
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu a7e4a61fd1 HV: add hybrid_rt source code for whl-ipc-i5/i7
Add hybrid_rt source code for whl-ipc-i5/i7.

Tracked-On: #5081
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 0266292ed6 acrn-config: refinemen config xmls for hybrid rt
1.Refine cpu affinity in hybrid rt xmls for whl-ipc-i5/7
2.Refine guest flag for hybrid rt xmls for whl-ipc-i5/7

Tracked-On: #5081
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu cbb5dde7b3 acrn-config: add passthru TPM for whl-ipc-i5/i7
Add support to generate passthru TPM information for whl-ipc-i5/i7.

Tracked-On: #5077
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 74e51046f7 acrn-config: fix build issue for TGL/EHL
There is some macro defined in misc_cfg.h while CAT/MBA enabled.
include the missing header to solve build issue.

Tracked-On: #5092
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 1dbbb5bf26 acrn-config: Add d3hot_reset sub-parameter for passthrough device
Add d3hot_reset sub-parameter if passthrough USB device for WaaG.

Tracked-On: #4047
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 3953a2136a acrn-config: update launch 1 uos script for tgl-rvp
Update launch 1 uos script for tgl-rvp.

Tracked-On: #5091
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-28 10:46:27 +08:00
Wei Liu 6cafb9cf01 acrn-config: configuration source refactor for new layout
Now the hypervisor configuration source code layout is changed, so acrn-config
need to change accordingly to make sure XML based configuration build success;

Tracked-On: #5077
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-24 16:16:06 +08:00
Victor Sun 38caecae56 HV: add whl-ipc-i7 configurations code in misc/vm_configs
Add whl-ipc-i7 configurations code in misc/vm_configs/ folder with new layout;

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-07-24 16:16:06 +08:00
Victor Sun b071cd6a67 HV: add whl-ipc-i5 configurations code in misc/vm_configs
Add whl-ipc-i5 configurations code in misc/vm_configs/ folder with new layout;

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-07-24 16:16:06 +08:00
Victor Sun c5bd227f5b HV: add formated nuc7i7dnb configurations code in misc/vm_configs
Add acrn-config tool formated nuc7i7dnb configurations code in misc/vm_configs/
folder with new layout;

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-07-24 16:16:06 +08:00
Victor Sun a57a4fd7fb HV: Make: enable build for new configs layout
The make command is same as old configs layout:

under acrn-hypervisor folder:
	make hypervisor BOARD=xxx SCENARIO=xxx [TARGET_DIR]=xxx [RELEASE=x]

under hypervisor folder:
	make BOARD=xxx SCENARIO=xxx [TARGET_DIR]=xxx [RELEASE=x]

if BOARD/SCENARIO parameter is not specified, the default will be:
	BOARD=nuc7i7dnb SCENARIO=industry

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-07-24 16:16:06 +08:00
Victor Sun e792fa3d3c HV: nuc7i7dnb example of new VM configuratons layout
There are 3 kinds of configurations in ACRN hypervisor source code: hypervisor
overall setting, per-board setting and scenario specific per-VM setting.
Currently Kconfig act as hypervisor overall setting and its souce is located at
"hypervisor/arch/x86/configs/$(BOARD).config"; Per-board configs are located at
"hypervisor/arch/x86/configs/$(BOARD)" folder; scenario specific per-VM configs
are located at "hypervisor/scenarios/$(SCENARIO)" folder.

This layout brings issues that board configs and VM configs are coupled tightly.
The board specific Kconfig file and misc_cfg.h are shared by all scenarios, and
scenario specific pci_dev.c is shared by all boards. So the user have no way to
build hypervisor binary for different scenario on different board with one
source code repo.

The patch will setup a new VM configurations layout as below:

  misc/vm_configs
  ├── boards                         --> folder of supported boards
  │   ├── <board_1>                  --> scenario-irrelevant board configs
  │   │   ├── board.c                --> C file of board configs
  │   │   ├── board_info.h           --> H file of board info
  │   │   ├── pci_devices.h          --> pBDF of PCI devices
  │   │   └── platform_acpi_info.h   --> native ACPI info
  │   ├── <board_2>
  │   ├── <board_3>
  │   └── <board...>
  └── scenarios                      --> folder of supported scenarios
      ├── <scenario_1>               --> scenario specific VM configs
      │   ├── <board_1>              --> board specific VM configs for <scenario_1>
      │   │   ├── <board_1>.config   --> Kconfig for specific scenario on specific board
      │   │   ├── misc_cfg.h         --> H file of board specific VM configs
      │   │   ├── pci_dev.c          --> board specific VM pci devices list
      │   │   └── vbar_base.h        --> vBAR base info of VM PT pci devices
      │   ├── <board_2>
      │   ├── <board_3>
      │   ├── <board...>
      │   ├── vm_configurations.c    --> C file of scenario specific VM configs
      │   └── vm_configurations.h    --> H file of scenario specific VM configs
      ├── <scenario_2>
      ├── <scenario_3>
      └── <scenario...>

The new layout would decouple board configs and VM configs completely:

The boards folder stores kinds of supported boards info, each board folder
stores scenario-irrelevant board configs only, which could be totally got from
a physical platform and works for all scenarios;

The scenarios folder stores VM configs of kinds of working scenario. In each
scenario folder, besides the generic scenario specific VM configs, the board
specific VM configs would be put in a embedded board folder.

In new layout, all configs files will be removed out of hypervisor folder and
moved to a separate folder. This would make hypervisor LoC calculation more
precisely with below fomula:
	typical LoC = Loc(hypervisor) + Loc(one vm_configs)
which
	Loc(one vm_configs) = Loc(misc/vm_configs/boards/<board>)
		+ LoC(misc/vm_configs/scenarios/<scenario>/<board>)
		+ Loc(misc/vm_configs/scenarios/<scenario>/vm_configurations.c
		+ Loc(misc/vm_configs/scenarios/<scenario>/vm_configurations.h

Tracked-On: #5077

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-07-24 16:16:06 +08:00
acrnsi-robot 4ffa6cc7b1
Merge pull request #5073 from dbkinder/debian-doc-fix
doc: update debian packaging documentation
2020-07-24 09:28:48 +08:00
David B. Kinder 187b552440 doc: update debian packaging documentation
Update the draft content about Debian packaging with something more user
friendly and complete.

I removed the version of the release.json included in the doc and
instead just include the release.json file directly.

I added comments about the configuration parameters directly in the
release.json file, using the convention already being used there.

(If we updated the json python package being used to json5, the
release.json file could include comments using // convention and things
would look a bit cleaner.)

Tracked-On: #5022

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-07-23 11:04:17 -07:00
Shuang Zheng 5731547893 acrn-config: add PRE_RT_VM in config app
add vm type PRE_RT_VM in config app

Tracked-On: #5081
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
2020-07-23 21:58:32 +08:00
Wei Liu 175b20770a acrn-config: add support Pre-launhced RT for acrn-config
1.Add UUID for Pre-launched RT VM.
2.Add hybrid_rt.xml for whl-ipc-i7/i5 and also add template Pre-Launched
RT sample xml.
3.Refine sanity check for load_kern_addr/entry.

Tracked-On: #5081
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-23 21:58:32 +08:00
Wei Liu 5034087a4f acrn-config: refine mac seed for launch config
Refine mac seed when generating launch script.

Tracked-On: #5039
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-23 10:49:42 +08:00
zhanqi 288efd31b4 create acrn hypervisor/kernel deb packaging
Tracked-On: #5022

Signed-off-by: zhanqi <sherry.qi.zhang@intel.com>
2020-07-20 11:44:07 +08:00
Wei Liu e5c5337886 acrn-config: generate '-s 1:0,lpc ' for non-hart rt in launch script
Generate '-s 1:0,lpc ' for none Hart RT in launch script.

Tracked-On: #5049
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-20 09:52:57 +08:00
Shuang Zheng 585c652f81 acrn-config: update board xml for ehl-crb-b
add tsn devices and the NVME device in the board xml

Tracked-On: #4831
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2020-07-16 14:50:04 +08:00
Wei Liu 76ec5f69f8 acrn-config: minor fix mac seed for launch config
Minor fix for mac seed when generating launch script.

Tracked-On: #5039
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-15 16:06:32 +08:00
Conghui Chen fcc9efec8e acrn-config: enable only 4 vms for TGL
Enable only 4 vms for TGL.

Tracked-On: #5013
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2020-07-14 12:43:34 +08:00
Wei Liu e413e23bdd acrn-config: extend the max msix table number to 64
Config tool should keep aligning with Kconfig default value for
MAX_MSIX_TABLE_NUM.

Note: Remain the same configuration for the board which does not have
PCIe slot or NVME slot.

Tracked-On: #4994
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-07-10 19:39:11 +08:00
Wei Liu 70d98da042 acrn-config: add max MSI-X table number for board xmls
1.add max MSI-X table number in board xmls.
2.leave MAX_MSIX_TABLE_NUM item to blank.

Tracked-On: #4994
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-10 19:39:11 +08:00
Wei Liu 1cb68b2cda acrn-config: detect and parse MSI-X table number
Detect and get MSI-X table number in board xmls.
Parse and generate the number for board config while 'MAX_MSIX_TABLE_NUM'
item is blank.

Tracked-On: #4994
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-10 19:39:11 +08:00
Wei Liu f2479f6489 acrn-config: update passtrough device config for ehl-crb-b launch xmls
1.Update passtrough device config for ehl-crb-b launch xmls.

Tracked-On: #5016
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-10 18:58:55 +08:00
Wei Liu 83d64c506f acrn-config: support 6 VMs for ehl-crb-b industry xml
Add support 6 VMs for ehl-crb-b industry xml.

Tracked-On: #5015
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-10 18:58:55 +08:00
Conghui Chen 6722132233 acrn-config: enable more VMs in TGL xml
Add more VMs in xml.
Enable vuart0 for VM1.

Tracked-On: #5013
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2020-07-08 10:16:34 +08:00
Conghui Chen 213cd4e2b2 acrn-config: enlarge ram size
enlarge ram size, otherwise, there would be compile issue for tgl.

Tracked-On: #5013
Signed-off-by: Conghui Chen <conghui.chen@intel.com>
2020-07-08 10:16:34 +08:00
Shuo A Liu 0b03a2a75a acrn-config: update EHL CRB configs
BIOS version: EHLSFWI1.R00.2224.A00.2005281500

Tracked-On: #4937
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
2020-07-06 13:48:12 +08:00
Shuang Zheng 2c6fad00ee acrn-config: add MBA delay support in acrn config app
MBA_DELAY/CLOS_MASK show be exposed only if "MBA"/"L2" or "L3" existed
in rdt resource supoorted in board xml;
The default value of MBA_DELAY is 0;
The numbers of MAB_DELAY/CLOS_MASK entries is determined by:
If CDP is not enabled, the number of entries for CLOS_MASK and MBA_DELAY
is the min of CLOS_MAX of all RDT resources;
If CDP is enabled,  divide the CLOS_MAX values for L3 and L2 resources
by 2 and then find the min of all RDT resources to get common_clos_max,
the number of entries for CLOS_MASK is common_clos_max*2,
the number of entries for MBA_DELAY is comm_clos_max.

Tracked-On: #4943
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2020-07-06 13:48:12 +08:00
Wei Liu 6e2f8e2a03 acrn-config: refine sanity check for RDT/MBA
Refine sanity check for RDT CLOS and MBA Delay.

Tracked-On: #4943
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
2020-07-06 13:48:12 +08:00
Wei Liu 30750fa7d5 acrn-config: update the LICENSE year in config tool
Update the LICENSE year for hv files which generate by config tool.

Tracked-On: #5004
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-06 13:43:15 +08:00
Wei Liu f716d8a2ad acrn-config: remove unnecessary check for pci.ids
The pci.ids database should be already prepared while tools of 'lspci'
were correctly installed and this check for pci.ids should be removed.

Tracked-On: #4989
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-06 13:43:15 +08:00
Wei Liu 76745ccc18 acrn-config: improvement sanity check for vuart1 target id settings
For the base of vuart 1 is not an invalid com base, the tools will check
the target vuart id and it's VM id if matches the other VM's. If they do
not match the error message will report to re-configuration.

Tracked-On: #4991
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-07-06 13:43:15 +08:00
Minggui Cao 0080c6ca72 tools: improve Makefile to build life-mngr
1. add life-mngr as a target in misc/Makefile, so it is
convenient to build and used in Yocto system.
2. add install target in life-mngr/Makefile to be packaged
into device file-system.

Tracked-On: #4870
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2020-07-02 13:51:34 +08:00
Vijay Dhanraj da2200167b acrn-config: Add missing MBA_delay configuration in scenario xml
This patch adds support to configure MBA delay values from
scenario xml files just as it is done for CAT mask. This will
improve user experience when configuring RDT resource mask
values.

Tracked-On: #4943
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-24 09:54:00 +08:00
Wei Liu 96d1cbf7f3 acrn-config: modify the linux like uos type to yocto
Modify the linux like uos type to yocto.

Tracked-On: #4901
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-06-18 16:02:23 +08:00
Binbin Wu 957dc4e8d7 acrn-config: ehl: increase max msix table size and irte size
There are three TSN devices on EHL CRB, and each of them need 32
vectors.
In order to support TSN devices, increase msix table size and irte
size.

Tracked-On: #4831
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-06-16 08:52:56 +08:00
Wei Liu 7c7bf767f6 acrn-config: add support to generate General Linux/Yocto/Ubuntu
Add support to generate Linux like oS launch scripts.

Tracked-On: #4901
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-06-11 14:05:19 +08:00
Wei Liu cd1895d1e7 acrn-config: modify whl-ipc-i7 default industry xml
modify whl-ipc-i7 default industry xml to avoid build issue.

Tracked-On: #4913
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
2020-06-11 14:05:19 +08:00
Wei Liu 219bec5146 acrn-config: generate msix emulation information
generate msix emulation information from known exist PCI devices for
board config.

Tracked-On: #4831
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-10 14:32:15 +08:00
David B. Kinder a884fa15fb doc: update tools docs to use vm-ubuntu name
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-06-08 20:21:56 -07:00
Naveen Saini b919122c34 use variables for installation directories.
Don't hardcode install paths. Instead of hardcoding where binaries are
installed, add variables that installer can override.

Tracked-On: #4864

Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2020-06-05 15:25:12 +08:00
Wei Liu d694760167 acrn-config: add RDT configurable item for QEMU sdc xml
add RDT configurable item for QEMU sdc xml

Tracked-On: #4889
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-05 09:14:15 +08:00
Wei Liu 2e9da35ea3 acrn-config: refine sanity check for MASK_CLOS number
refine sanity check for MASK_CLOS number by max clos in board xml.

Tracked-On: #4876
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-03 22:18:31 +08:00
Wei Liu a4a3b4e951 acrn-config: refine GVT args for SOS cmdline
1.Refinement GVT args for SOS kernel cmdline in scenario config xmls.
2.Refinement GVT args for launch UOS script in launch config xmls.

Tracked-On: #4869
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-03 22:02:58 +08:00
Wei Liu 83275cf892 acrn-config: update efi bootloader image file path for acrn-config
1.Update efi bootloader image file path for Yocto rootfs.
2.Remove empty check for UEFI OS loader name.

Tracked-On: #4868
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-03 22:02:58 +08:00
Wei Liu 7e5c2865d7 acrn-config: update native board information
Update mrb ttys, up2 iomem and ehl-crb-b information.

Tracked-On: #4862
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-02 15:15:39 +08:00
Wei Liu 5403fd720d acrn-config: re-generate TTYS_INFO in native board
Currently, MMIO PCI BDF of ttyS was indexed by IRQ, but it may found
the wrong BDF when the IRQ was shared and it is not expected. So, the
patch uses the MMIO base to query /proc/iomem to find BDF, the waring
will get if BDF is not present in iomem.

Tracked-On: #4862
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-02 15:15:39 +08:00
Shuang Zheng 93b12818c7 acrn-config: add RDT support in scenario config of config app
RDT config item is located in the 5rd layer of scenario config;
the number of CLOS_MASK config is dynamically obtained by the rdt
resource clos max in the board config;
the vcpu_clos config is dynamically added or removed when the
pcpu_id config is added or removed;
the drop-down list of vcpu_clos config is reduced by half when
CDP_ENABLED=y.

Tracked-On: #4860
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2020-06-01 14:32:57 +08:00
Wei Liu 6ed2b855bf acrn-config: support to parse RDT information
1.Add parser and sanity check for RDT_ENABLED/CDP_ENABLED/CLOS_MASK.
2.Skip to generate RDT inforamtion when HW not support RDT or usr
select 'n' to disable RDT feature.
3.Add contiguous bit 1 check for CLOS_MASK.

Tracked-On: #4860
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-01 14:32:57 +08:00
Wei Liu abba0f0e63 acrn-config: add configurable RDT feature in scenario xmls
1.Add RDT feature in scenario xmls, add set RDT_ENABLED=y, CDP_ENABLED=n
by default for industry scenario if HW support RDT.
2.Add CLOS_MASK in xmls to configurable and set them to '0xff' by
default if HW support RDT.
3.Remove configurable="0" of clos for PRE launched VM and POST VM, currently,
remain configurable="0" for SOS VM.
4.Add vcpu_clos to match the pcpu_id number, and set vcpu_clos to 0.

Tracked-On: #4860
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-06-01 14:32:57 +08:00
Vijay Dhanraj 290886d4d0 acrn-config: Platform xml file support to run ACRN on QEMU
This patch adds xml file, both board as well scenario files
that are need to run ACRN on top of QEMU as a nested hypervisor.

Currently support is only for SDC scenario.

Tracked-On: #3198
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-21 15:34:38 +08:00
Vijay Dhanraj 2175c17c97 acrn-config: Set defaults on empty leaf for generated <board>.xml file
This patch sets defaults similar to generic platform configuration
when leaf features like PM_INFO, S3_INFO, S5_INFO, DRHD_INFO, CPU_BRAND,
CX_INFO, PX_INFO, MMCFG_BASE_INFO are not generated via either target
offline tool or user supplies empty field in case of emulation.

Tracked-On: #3198
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-21 15:34:38 +08:00
Minggui Cao a335679ce9 Makefile: remove 'clean' when building HV/DM
1. not need 'clean' when building ACRN-HV/DM each time
2. correct efi-stub wrong dependency

Tracked-On: #2412
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
2020-05-21 15:12:21 +08:00
Wei Liu fca8750ba6 acrn-config: generate console=ttyS0 for PRE Launched VM
Remove pre-launched VM console setting in scenario xml and leave it
configured in bootargs directly.

Tracked-On: #4808
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:51:31 +08:00
Wei Liu 65c0cc7362 acrn-config: remove rootfs item from PRE Launched VM
The bootarg of rootfs for pre-launched VM is for Linux only and it
should not limited to physical block device which is selectable from
native rootfs list, it might be a USB or RAM device that "X" is variable
in root=/dev/sdX or /dev/ramX. So remove the rootfs setting in XML and
leave it configured in kernel bootargs directly.
Given the SOS must be Linux and its rootfs must be a physical block
device, rootfs item tag is still reserved in xml for SOS VM section.

Tracked-On: #4808
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:51:31 +08:00
Wei Liu 3ecaa62510 acrn-config: remove configurable="0" for hybrid scenario config
remove configurable="0" for hybrid scenario pci_devs of Pre Launched VM.

Tracked-On: #4808
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:51:31 +08:00
Wei Liu 39ab45f06b acrn-config: generate pci_dev.c file for logical partition
With current acrn-config code, there would be no pci_dev.c generated
if no PCI devices were selected. This would cause a bug for logical_partition
scenario because of an old pci_dev.c is already in the folder and involved
for compiling. The configure tool should override the pci_dev.c, in this case,
to avoid building error.

Tracked-On: #4813
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-05-20 13:36:03 +08:00
Wei Liu 8b736cc131 acrn-config: generate correct IRQ for VUART1
As VUART is not supported PCI VUART, use native PCI ttySn's IRQ for
VUART1 would cause communication failed, allocate a free IRQ for it.

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 f644b3705b acrn-config: refine the 'vm_name' parameter for launch script
Use post_vm_id$(relative id) to identify each post-launched VM to
make sure simultaneous launching successfully.

Tracked-On: #4797
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
Shuang Zheng 515c70010f acrn-config: add board and default config xmls for ehl
add board xml and default scenario config xmls and launch config
xmls for ElkhartLake boards.

Tracked-On: #4798
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-05-15 13:25:09 +08:00
Wei Liu 8ebf89eaa8 acrn-config: refinement acrn-dm arguments for "Soft RT/Hard RT" VMs
Assign the right acrn-dm arguments for "Soft RT/Hard RT" VMs by
'uos_type' in webUI item tag.

Tracked-On: #4799
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 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
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
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
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
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
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
Wei Liu db14c2f89f acrn-config: parse KATA VM count number with vm_type 'KATA_VM'
Parse KATA VM count number from scenario config with vm_type 'KATA_VM'
and Remove MAX_KATA_VM_NUM from scenario config xmls.

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 5936bf431c acrn-config: refine slot assignment for launch config
When passthrough device for VM, if there is no fun0 of the slot was passed
in, PCI expansion card can not respond as a device, it must implement at
least function number 0.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-29 09:52:37 +08:00
Wei Liu c8eda07323 acrn-config: refinement for CPU affinity check
Refine CPU affinity sanity check for both scenario and launch config
xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-29 09:52:37 +08:00
Wei Liu 3078595da5 acrn-config: add vm type sanity check
Refinement for VM type sanity check relays on VM UUID number.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu 539905e1f4 acrn-config: refinement for pci_devs in scenario config xmls
remove configurable="0" for pci_devs of pre-launched VM so that the
passthru devices could be configurable on webUI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu a43b42b2a0 acrn-config: parse cpu_affinity from launch config xmls
Parse cpu_affinity from launch config xmls and generate '--cpu_affinity' as
acrn-dm args.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Wei Liu 233f2deb4b acrn-config: add cpu_affinity for launch config xmls
1.Remove cpu_sharing item from launch config xml.
2.Add cpu_affinity for launch config xmls to configurable POST VM cpu
affinity from webUI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-24 16:19:55 +08:00
Zide Chen 1e3df01362 acrn-config: update cpu_affinity in scenrio configuration xml files
Change the tag name from "vcpu_affinity" to 'cpu_affinity" in all the per
board scenario xml files, and change the descritpions.

Tracked-On: #4641
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-23 09:38:54 +08:00
Zide Chen fafce7aa5f acrn-config: change names for vcpu_affinity[] related items
hypervisor is replacing vm_configs[].vcpu_affinity[] array with
cpu_affinity_bitmap, the meaning of which has some changes as well.

This patch changes the names in generated vm_configuration.c:
-.vcpu_affinity = VMx_CONFIG_VCPU_AFFINITY,
+.cpu_affinity_bitmap = VMx_CONFIG_CPU_AFFINITY,

Changes in vm_configuration.h:
-#define  VMx_CONFIG_VCPU_AFFINITY {AFFINITY_CPU(xU), AFFINITY_CPU(xU)}
+#define  VMx_CONFIG_CPU_AFFINITY  (AFFINITY_CPU(xU) | AFFINITY_CPU(xU))

Also don't generate default assignment of vcpu_num in vm_configuration.c,
because now hypervisor can easily calculate it from cpu_affinity_bitmap.

Accordingly, in the scenario xml files, tag "vcpu_affinity" is changed
to "cpu_affinity".

Tracked-On: #4641
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-23 09:38:54 +08:00
Shuang Zheng f7594f0a93 acrn-config: assign VM IDs for dynamic scenario and launch setting
When dynamically creating or adding or deleting VMs, acrn config app
will assign VM IDs for the VMs with the orders of prelaunched VMs and SOS
VM and postlaunched VMs to be consistent with the VM order of vm_configs
in vm configuration. When dynamically creating launch scripts, acrn
config app will let users to specify the VM ID before launch setting.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Shuang Zheng 44ec68dc49 acrn-config: add attributes for scenario and launch setting
There are no board/scenario/uos_launcher attributes for created
scenario and launch settings, which causes xml mismatch error
when generating configuration files or launch scripts.
This patch is to add the attributes for scearnio and launch
settings.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu ea61900a80 acrn-config: add max VM count check when generating scenario XML file
Add max VM count check when generating scenario XML file.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu 374cd99ed9 acrn-config: refine template xmls
Refine some items for configuarable="0"

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Wei Liu 71b3743a75 acrn-config: add 2 UUIDs for post-launched Standard VM
Add 2 UUIDs for post-launched Standard VM.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-22 20:10:17 +08:00
Victor Sun 27fb606d7a acrn-config: add SOS_IDLE for SOS cmdline
Add SOS_IDLE for SOS cmdline so that "idle=halt" paramter will be needed
only when CPU sharing is enabled;

Tracked-On: #4329

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-04-22 14:49:04 +08:00
Geoffroy Van Cutsem b22d9e5e15 acrn-config: fix typos and text in board_parser.py tool
Enhance and fix some typos in the text that gets printed out from the
board_parser.py script.

Tracked-On: #4630
Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2020-04-22 10:42:54 +08:00
Wei Liu 28ef2f509b acrn-config: remove sdc2 config xmls
Remove sdc2 scenario since the VM launch requirement under this scenario
will be satisfied by industry scenario.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 72892926c8 acrn-config: refine the HV_RAM_SIZE/HV_RAM_START for board_defconfig
Leave HV_RAM_SIZE/HV_RAM_START default to blank, and config tool would
generate for them, otherwise, they would be set by the UI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu a1a8807268 acrn-config: set HV_RAM_SIZE/HV_RAM_START to blank from config xmls
Leave HV_RAM_SIZE/HV_RAM_START default to blank, and config tool would
generate for them, otherwise, they would be set by the UI.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 602c87acb8 acrn-config: refine template xmls
1. Set default value for HV template.
2. Refine vuartx in template vm setting xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu 369547aa63 acrn-config: modify epc_section to configurable="0"
1. modify epc_section to configurable="0".
2. add 'idle=halt' for sos bootargs to impove performance.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu d4236bc02d acrn-config: fix syntax for new logical partition xmls
UI got syntax warning while loading new logical partitons xml, add
missed '</clos>' for it.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu b69e2685d5 acrn-config: refine GPU vpid format for launch script
Refine GPU vpid format for launch script.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Wei Liu a0e18eec34 acrn-config: refine '--out' for config tool
Currently, '--out' is relative scripts run dir if it gets relative path,
Refine '--out' to source root tree if it gets relative path.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-22 08:43:45 +08:00
Sainath Grandhi c548ba10b9 acrn-config: Generate info in pci_dev file for Pre-Launched VMs
Pre-Launched VMs need the vbar_base values pre-populated
for pass-thru PCI devices.

This patch moves the pci parser logic from board_cfg_gen to library
so that scenario_cfg_gen scripts can use pci parser routines while
generating pci_dev file logical partition scenario.

Tracked-On: #4666
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-04-20 21:59:23 +08:00
Victor Sun 09212cf4b6 HV: Kconfig: enable CPU sharing by default
The patch enables CPU sharing feature by default, the default scheduler is
set to SCHED_BVT;

Tracked-On: #4661

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-04-20 14:59:23 +08:00
Yin Fengwei 345cb77376 crashlog: fix build issue under latest clearlinux
gcc in latest clearlinux enabled the pointer-sign warning as
default. This breaks the acrn-crashlog build.

Make acrn-crashlog build issue fixed by convert to correct
pointer type.

Tracked-On: #4636
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
2020-04-20 14:54:33 +08:00
Shuang Zheng 6aeadb9cbb acrn-config: add template xmls for dynamic config
The template xmls are used to be the dafault VM settings for dynamically
adding VMs.

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Shuang Zheng b9ce7617cd acrn-config: dynamic configuration for scenario setting and launch setting
config app implements interfaces to dynamically:
    create new scenario settings based on tempaltes;
    create new launch settings based on templates;
    add or delete VMs for scenario settings;
    add or delete VMs for launch settings;
    load default scenario or launch settings

Tracked-On: #4641

Signed-off-by: Shuang Zheng <shuang.zheng@intel.com
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu ccef1af1f0 acrn-config: remove hard code UUID from config xmls
To keep align hv source code changes, config tool doese below changes:
1. Remove UUID from scenario config files.
2. Remove severity from scenario config files.
3. Use vm type to instead load order type.
4. Use the mapped UUID data base for launch vm script configurations.
5. Unify the ui_entry_api for '--out'

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu eb341caa83 acrn-config: Use vm_type to instead load_type/uuid/severity in config
Use vm_type to instead combination of load_type/uuid/severity in config
xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu eba8c23bff acrn-config: support to parse pci_devs for pre launched vm
As it doesn't depends on the scenario, there are sos/pre launched VMS
in config xmls, emulate vhostbridge for sos vm, specify the pass-thru
PCI device for pre launched vm.
Add support to parse pci_devs for pre launched vm.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu 8fbd859fbf acrn-config: add pass-thru PCI device for pre launched vm xmls
Add pass-thru PCI device for pre launched vm section in config xmls.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Wei Liu c967c0d522 acrn-config: remove 'scenario' dependency from acrn config tool
For purpose weaken 'scenario' from config tool, remove 'scenario' dependency
from config tool.

Tracked-On: #4641
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-17 13:45:18 +08:00
Mingqiang Chi 2b648476cc life_mngr:fix resend shutdown cmd fail
1) fix a bug,resend shutdown cmd only send one character
2) move out accept routine from while loop, let this thread
   can read data from acrn-dm continuously.

Tracked-On: #4446
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Yuhong Tao <yuhong.tao@intel.com>
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Wang, Yu1 <yu1.wang@intel.com>
2020-04-16 22:04:53 +08:00
Naveen Saini fc5292e354 acrnprobe: avoid race condition
main.c is compiled while version.h being generated. This will
result following error:

| main.c: In function 'main':
| main.c:95:5: error: 'AP_MAJOR_VERSION' undeclared (first use in this function)
|    95 |     AP_MAJOR_VERSION, AP_MINOR_VERSION,
|       |     ^~~~~~~~~~~~~~~~
| main.c:95:5: note: each undeclared identifier is reported only once for each function it appears in
| main.c:95:23: error: 'AP_MINOR_VERSION' undeclared (first use in this function)
|    95 |     AP_MAJOR_VERSION, AP_MINOR_VERSION,
|       |                       ^~~~~~~~~~~~~~~~
| main.c:96:5: error: 'AP_BUILD_VERSION' undeclared (first use in this function)
|    96 |     AP_BUILD_VERSION, AP_BUILD_USER,
|       |     ^~~~~~~~~~~~~~~~
| main.c:96:23: error: 'AP_BUILD_USER' undeclared (first use in this function)
|    96 |     AP_BUILD_VERSION, AP_BUILD_USER,
|       |                       ^~~~~~~~~~~~~
| main.c:97:5: error: 'AP_BUILD_TIME' undeclared (first use in this function)
|    97 |     AP_BUILD_TIME);
|       |     ^~~~~~~~~~~~~

Similar issues observed with usercrash too.

To fix this, add version.h header as dependency, to make sure
it is generated successfully.

Tracked-On: #4590

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
2020-04-16 21:49:18 +08:00
Shuang Zheng b9583f42e9 acrn-config: enable hv config for scenarion setting UI
config app supports hv config in scenario setting UI.

Tracked-On: #4634
Signed-off-by: Shuang Zheng <shuang.zheng@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
Acked by: Terry Zou <terry.zou@intel.com>
2020-04-16 08:50:31 +08:00
Wei Liu b4a61abe45 acrn-config: add hv configurations to scenario config xmls
Update the board defconfig to scenario config xmls, and user can configure
it from webUI.

Tracked-On: #4634
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-16 08:50:31 +08:00
Wei Liu b30d304d69 acrn-config: add support to parse board defconfig from configurations
Board defconfig depends on hypervisor configurations and vm configurations,
add this to support to parse board defconfig from vm configuration.

Tracked-On: #4634
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-16 08:50:31 +08:00
Wei Liu 138c3aeadd acrn-config: support passthroug GVT for WaaG by default
Modify launch config tool to support passthroug GVT for WaaG by default.

Tracked-On: #4625
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-15 15:28:14 +08:00
Sainath Grandhi e14cafe412 acrn-config: round HI_MMIO_START/HI_MMIO_END to the closest 1G
Rounding HI_MMIO_START, HI_MMIO_END to the closest 1G. This avoids
round up logic in the hypervisor.

Tracked-On: #4586
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-04-13 16:52:18 +08:00
Wei Liu 793e22a87a acrn-config: remove the same parameters and functions from launch_cfg_lib
Launch config should relay on library/common.py and launch_cfg_lib,
then remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00
Wei Liu ba3c531e50 acrn-config: remove the same parameters and functions from scenario_cfg_lib
Scenario config should relay on library/common.py and scenario_cfg_lib,
then remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00
Wei Liu ed8ac484ad acrn-config: remove the same parameters and functions from board_cfg_lib
Board config should relay on library/common.py and board_cfg_lib, then
remove the duplicate parameters and functions.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00
Wei Liu 78ce220eb9 acrn-config: expends parameters and functions to common lib
For purpose to refine the library/common and xx_cfg_lib, should have
to expands parameters and functions to common.py firstly.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-08 10:19:17 +08:00
Sainath Grandhi 140077f225 acrn-config: Fixes for BAR remapping logic
This patch does the following
1) Removes the limitation on BAR size for 1 GB
2) Align the BAR address to the BAR size

Tracked-On: #4586
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-07 13:08:25 +08:00
Wei Liu dc7f218314 acrn-config: update IOMEM_INFO of tgl-rvp board
As we did in commit: 697f3fc09f, need
to update IOMEM_INFO for tgl-rvp.

Tracked-On: #4582
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-04-07 10:49:16 +08:00
Yan, Like e66c27df77 acrn-config: enable CAT for industry scenario on APL-UP2 by default
Tracked-On: #4566
Signed-off-by: Yan, Like <like.yan@intel.com>
Signed-off-by: Liu, Wei <weix.w.liu@intel.com>
2020-04-02 13:55:35 +08:00
Yan, Like 0b384b7284 acrn-config: support generation of per vcpu clos configuraton
Added "vcpu_clos" to configuration XML, here is an example of VM2 with 2 vCPUs:
  <clos desc="Class of Service for Cache Allocation Technology. Please refer SDM 17.19.2 for details and use with caution.">
	<vcpu_clos>1</vcpu_clos>
	<vcpu_clos>0</vcpu_clos>
  </clos>

A macro will be generated in vm_configuration.h:
  #define VM2_VCPU_CLOS          {1U, 0U}

And the macro will be used in vm_configuration.c:
  struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
	...
	{
		...
		.clos = VM2_VCPU_CLOS,
		...
	}
  }

Tracked-On: #4566
Signed-off-by: Yan, Like <like.yan@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2020-04-02 13:55:35 +08:00
Wei Liu 5c297be955 acrn-config: find 64-bit mmio for HI_MMIO_START/HI_MMIO_END
Find the 64-bit mmio window from /proc/iomem to generate HI_MMIO_START/HI_MMIO_END.

Tracked-On: #4569
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-02 09:54:09 +08:00
Wei Liu 697f3fc09f acrn-config: update IOMEM_INFO of native board config xml
Replace SYSTEM_INFO with IOMEM_INFO for board xml files.

Tracked-On: #4569
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-02 09:54:09 +08:00
Wei Liu 6a9319b685 acrn-config: dump iomem info from /proc/iomem
Need more information from iomem, so dump all the iomem information
from /proc/iomem to instead of system ram information.

Tracked-On: #4569
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
Acked-by: Terry Zou <terry.zou@intel.com>
2020-04-02 09:54:09 +08:00
Sainath Grandhi a19bcec6b9 acrn-config: Limit check on Pre-Launched VM RAM size
size and size_hpa2 can be greater than 2GB for Pre-Launched VMs.

Tracked-On: #4565
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-04-01 16:39:21 +08:00
Wei Liu e1ae5ba638 acrn-config: support '--out' option for board/scenario/launch config
Currently, config tool generate board files and scenario files in
acrn-hypervisor directory, the origin souce code would be corrupted by
the config tool. Config tool add '--out' option for user to give a path
to store the generated files, without this option, tool will generate
files in origin source code.

Tracked-On: #4517
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu 6b9c1f2d31 acrn-config: correct passthru 'audio' device for nuc6cayh
Correct mismatch PCI audio device for passthrough in nuc6cayh.

Tracked-On: #4530
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu 4e9e052bcb acrn-config: minor fix for generating CONFIG_PCI_BDF
Modify the pattern to grap the correct PCI BDF from board information
file.

Tracked-On: #4530
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu b42c283b20 acrn-config: add some configs in board defconfig
1. add CONFIG_scenario=y config in $(BOARD).config file so that
SCENARIO parameter will not be needed when build with xmls.

2. add CONFIG_MAX_KATA_VM_NUM;

3. add CONFIG_ENFORCE_VALIDATED_ACPI_INFO=y because all ACPI info
generated by acrn-config has been validated;

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Wei Liu 3c425fa919 acrn-config: remove git check and avoid to generate patch for config files
Remove '--enable_commit' argument since acrn-config will not use git tool any
more.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-31 10:27:33 +08:00
Victor Sun 0074ad1d20 acrn-config: one button to generate config file
Currently we use separate button to generate board configuration files and
scenario configuration files for hypervisor, this is not friendly from UX
perspective. So remove redundant button on HV configuration generation.

Tracked-On: #3854
Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Shuang Zheng <shuang.zheng@intel.com>
2020-03-31 10:27:33 +08:00
Tonny Tzeng 052889c022 acrn-config: create temporary scenario file folder if it doesn't exist
This commit creates the folder for hosting the temporary scenario .xml files if the folder doesn't exist to avoid the FileNotFound python exception.

Tracked-On: #4522
Signed-off-by: Tonny Tzeng <tonny.tzeng@intel.com>
2020-03-26 09:31:57 +08:00
Yin Fengwei c9e3d36ef1 efi-stub: fix wrong bootloader name issue
UEFI pass option as unicode string to efi-stub. That string has
no end charactor ('\0'). Insteadly, the option has string size
and we should use the string size to decide the end of the option
string.

Tracked-On: #4520
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Reviewed-by: Zide Chen <zide.chen@intel.com>
2020-03-25 14:37:00 +08:00
David B. Kinder a086d72974 doc: fix docs with broken links
Fix links in documentation that have moved (e.g.,
clearlinux.org/documentation moved to docs.01.org/clearlinux/latest).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-03-22 11:35:17 -04:00
Wei Liu b10b309b21 acrn-config: fix missing passthru parameter for launch config
If the bus number is not 0, then malloc a virtual slot for the device,
meanwhile, it should be added to PT_SLOT for the next query, otherwise
the passthru parameter would be lost in the launch script.

Tracked-On: #4494
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-17 16:37:43 +08:00
Wei Liu ae5f0f1c9b acrn-config: add missed include in pci_dev.c for logical partition
commit a68f655a11 added two extra header
include in pci_dev.c for logical_partition scenario but acrn-config did
not handle that.
This patch fix the issue.

Tracked-On: #4492
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-17 15:04:57 +08:00
Wei Liu b62d439bf1 acrn-config: remove a function that generates ve820 file
1. To keep align with acrn-hypervisor source code, remove a function
that generates ve820 file.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-12 14:56:34 +08:00
Wei Liu 27b6c82c0f acrn-config: keep HV_RAM_START 2M memory align
Refine HV_RAM_START to keep 2M memory align for new board config.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-12 14:56:34 +08:00
Wei Liu 91b06a35ee acrn-config: remap PCI vbar address to high memory
1. If the device configure space is not fixed by ACPI and its pbar address
is above 4G or lower than 2G, then remap the vbar address to high memory.
2. Due to GPU might have huge MMIO space which would result in
HV_RAM_SIZE overflow, skip its vBAR remapping for now when the size high
than 1GB.

Tracked-On: #4458
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-12 14:56:34 +08:00
Wei Liu 830df76f1e acrn-config: refine VM number macro from scenario config
1. refine vm number macro from scenario config.
2. add sanity check for load order.

Tracked-On: #4458
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-12 14:56:34 +08:00
Mingqiang Chi 7e74ed557b misc:life_mngr: support S5 triggered by RTVM
Currently the life_mngr daemon has supported:
listen from the SOS shutdown command,
this patch add support listen shutdown command from RTVM.

and this life_mngr daemon can also run on SOS for listening
shutdown commond from acrn-dm(triggered by RTVM).

Tracked-On: #4446
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Reviewed-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yuhong, Tao <yuhong.tao@intel.com>
Acked-by: Yan, Like <like.yan@intel.com>
2020-03-12 08:12:39 +08:00
Wei Liu 835dc22a18 acrn-config: sdc2 UUID update
Since there is no RTVM requirement for sdc2 scenario, replace uuid
495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 which is dedicated to RTVM with
615db82a-e189-4b4f-8dbb-d321343e4ab3

Tracked-On: #4472
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-09 13:28:31 +08:00
Wei Liu b25d5fa502 acrn-config: remove redundant sos bootargs from vm config
The SOS_BOOTARGS_DIFF which defined in config xml has included most diff
bootargs, so the prints in vm_configuraton_h.py is redundant and would
cause wrong boot param for SOS VM.

Tracked-On: #4470
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-09 12:55:38 +08:00
Vijay Dhanraj 9a79443204 acrn-config: Generate target xml and board.c file with MBA RDT resource
This patch adds support for,
1. Storing MBA resource and its max supported clos value
in the target xml file under clos subsection.
2. Generating board.c file with MBA RDT resource.

Tracked-On: #3725
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-06 08:52:55 +08:00
Zide Chen 67cb1029d9 hv: update the hypervisor 64-bit entry address for efi-stub
- remove .data and .text directives. We want to place all the boot data and
  text in the .entry section since the boot code is different from others
  in terms of relocation fixup. With this change, the page tables are in
  entry section now and it's aligned at 4KB.

- regardless CONFIG_MULTIBOOT2 is set or not, the 64-bit entry offset is
  fixed at 0x1200:

  0x00 -- 0x10: Multiboot1 header
  0x10 -- 0x88: Multiboot2 header if CONFIG_MULTIBOOT2 is set
  0x1000: start of entry section: cpu_primary_start_32
  0x1200: cpu_primary_start_64 (thanks to the '.org 0x200' directive)
          GDT tables
	  initial page tables
	  etc.

Tracked-On: #4441
Reviewed-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-06 08:27:46 +08:00
Wei Liu d54d35efe5 acrn-config: correct console argument for logical partition scenario
Currently config tool generated 'console=/dev/ttySn' in boot cmdline
for logical_partiton scenario, need to strip '/dev/' to avoid kernel
boot issue.

Tracked-On: #4451
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-04 14:26:25 +08:00
Vijay Dhanraj 58c0a47474 acrn-config: Fix vbar address generated by the offline tool
Devices that support SR-IOV can expose their capabilities in
lspci -vv command as below. The offline tool, instead of picking
up the bios exposed memory region(bc000000) for the devices ends
picking up the SR-IOV memory region(00000000c0000000) and generates
VBAR address (in pci_devices.h). This is incorrect. This patch
fixes the offline tool to take the right memory region as the
VBAR address.

Sample lspic -vv log:
67:00.0 Ethernet controller: Intel Corporation Ethernet Connection
 X722 for 10GbE backplane (rev 09)
Subsystem: Intel Corporation Device 0000
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
Latency: 0
Interrupt: pin A routed to IRQ 61
Region 0: Memory at bc000000 (64-bit, prefetchable) [size=16M]
Region 3: Memory at c1000000 (64-bit, prefetchable) [size=32K]
Capabilities: [160 v1] Single Root I/O Virtualization (SR-IOV)
IOVCap: Migration-, Interrupt Message Number: 000
IOVCtl: Enable- Migration- Interrupt- MSE- ARIHierarchy+
IOVSta: Migration-
Initial VFs: 32, Total VFs: 32, Number of VFs: 0, Function Dependency Link: 00
VF offset: 16, stride: 1, Device ID: 37cd
Supported Page Size: 00000553, System Page Size: 00000001
Region 0: Memory at 00000000c0000000 (64-bit, prefetchable)
Region 3: Memory at 00000000c1020000 (64-bit, prefetchable)
VF Migration: offset: 00000000, BIR: 0

Tracked-On: #4443
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:19 +08:00
Vijay Dhanraj cee8dc22f1 acrn-config: Remove "GUEST_FLAG_CLOS_REQUIRED" from offline tool
This patches removes the unused CLOS_required flag from the
offline guest configuration tool.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Vijay Dhanraj 984c0753c6 xmls: Update existing <$BOARD$>.xml files for RDT support
This patch updates existing <$BOARD$>.xml for RDT support.
If the platform supports RDT, the resource and MAX CLOS
value is generated, else the CLOS_INFO is set to empty.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Vijay Dhanraj a81fcc2308 acrn-config: Set/Unset RDT support in the <$BOARD$>.config file
This patch checks if RDT feature is supported by platform and
updates the CONFIG_RDT_ENABLED flag in the <$BOARD$>.config
file accordingly.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Vijay Dhanraj 6cfd81cdf1 acrn-config: Generate board.c file with multiple RDT resources
This patch adds support for as generating board.c file
with multiple RDT resources.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Vijay Dhanraj b9f469437d acrn-config: Update common platform clos max on scenario
and vm configuration

This patch adds support for,
1. Providing list of max supported CLOS value that is common
between all RDT resource to user when configuring scenario xml.
2. Validate and set the clos value in the vm_configuration file.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Vijay Dhanraj cdac28e84d acrn-config: Update platform max CLOS value to be least common
value among RDT resources.

This patch identifies the least common supported clos value
from multiple RDT resource. This is done so as to have
consistent capabilities across all resource allocations.

From SDM, "The number of CLOS supported for the MBA feature
may or may not align with other resources such as L3 CAT. In
cases where the RDT features support different numbers of
CLOS the lowest numerical CLOS support the common set of
features, while higher CLOS may support a subset. For instance,
if L3 CAT supports 8 CLOS while MBA supports 4 CLOS, all 8 CLOS
would have L3 CAT masks available for cache control, but the
upper 4 CLOS would not offer MBA support. In this case the upper
4 CLOS would not be subject to any throttling control. Software
can manage supported resources / CLOS in order to either have
1) consistent capabilities across CLOS by using the common subset
or 2) enable more flexibility by selectively applying resource
control where needed based on careful CLOS and thread mapping".

We decided to go with option #1, as it will be more consistent
and less prone to user errorw hen programming the resource mask
MSRs.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Vijay Dhanraj 89a635438d acrn-config: Extract RDT resource and CLOS from target
xml file

This patch adds support for parsing RDT resources and
its max clos, max supported mask values from the target xml file.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Vijay Dhanraj 4a007cc3a9 acrn-config: Generate target xml file with multiple RDT resources
This patch adds support for storing multiple RDT resource
and its max supported clos value in the target xml file under
clos subsection.

Tracked-On: #3715
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-03-02 16:45:01 +08:00
Wei Liu 3098c4937b acrn-config: avoid conflict slot for launch config
The slot in launch config would be conflicted when the same bdf is
selected from webUI.
This patch do the below condition to avoid such case:
1. Add the bdf check for pass-through devices.
2. Use the bus:dev:func as passthru device option in launch config.

v1-v2:
1. If BUS of PCI device for passthru is not 0, then alloc a virtual
slot for it.

Tracked-On: #4312
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-02-28 09:14:00 +08:00
Wei Liu 0427de5ec4 acrn-config: Kata VM is not supported on dual-core systems
KATA VM is not supported on dual-core systems override the
MAX_KATA_VM_NUM to 0.

Tracked-On: #4319
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-02-28 09:14:00 +08:00
Wei Liu 170aa935bd acrn-config: add P2SB device to whitelist for apl-mrb
apl-mrb need to access P2SB device, so add 00:0d.0 P2SB device to
whitelist for platform pci hidden device.

Tracked-On: #3475
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-02-24 12:21:29 +08:00
Zide Chen 50f284528e acrn-config: a few changes on vm_config[] clos generation
- python script crashes if the desired 'clos' tag doesn't exist in the
  scenario xml file. In the following example, tag '0' doesn't exist:
      clos_set: {1: '0', 2: '0'}
  referring to tag 0 directly ("vm_info.clos_set[0] == None") causes crash.

  To fix it, this patch uses "if i in vm_info.clos_set:" where 'i' is the
  VM id and serves as the tag in the clos_set dictionary, to sanity
  check the dictionary.

- if the hardware doesn't support CAT, don't need to generate clos entry
  in the vm_config[], which could be confusing.

- to reduce redundant code, wrap the clos generation code as a function.

Tracked-On: #2462
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-02-13 10:39:58 +08:00
Alexander Merritt 2e10930d12 Python scripts discovering CPU IDs are off by 1
Tracked-On: #4387
Signed-off-by: Alexander Merritt <alex.merritt@intel.com>
2020-02-10 11:47:53 +08:00
Alexander Merritt ef1c92e841 fix typos in script
Tracked-On: #4388
Signed-off-by: Alexander Merritt <alex.merritt@intel.com>
2020-02-10 11:47:26 +08:00
Wei Liu 57a362061f acrn-config: set up whitelist for board containing hide pci device
Currently, config tool will maintain a whitelist for the board which
need to hide some pci devices. For the board out of whitelist, we set
MAX_HIDE_PDEVS_NUM to 0.

Tracked-On: #3475
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2020-01-07 16:05:30 +08:00
Zide Chen 5f2c303a7e acrn-config: dump CPU info from /sys/devices/system/cpu/possible
/proc/cpuinfo represents online CPUs only, and the number of CPUs is
limited by the 'maxcpus' option.

/sys/devices/system/cpu/possible is a better option for our purpose
since it represents the possible CPUs that can ever be available in the
system, including the offline CPUs. And it's not limited by 'maxcpus'.

Though the Linux command line parameter nr_cpus and possible_cpus still
have impact on /sys/devices/system/cpu/possible.

Tracked-On: #3854
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-31 08:47:08 +08:00
Wei Liu 77c3ce06e1 acrn-config: remove uncessary split for 'virtio-net'
Split the input message for 'virtio-net' would discard extra
message from user input, this is not expected for 'virtio-net' setting.

Tracked-On: #4298
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-25 14:28:07 +08:00
Wei Liu ce35a00518 acrn-config: add 'cpu_sharing' support for launch config
Add support to parse and get 'cpu_sharing' item value
from launch config files, these values are editable by user.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-25 14:28:07 +08:00
Wei Liu 3544f7c87e acrn-config: add 'cpu_sharing' info in launch xmls
Launch script should be set to 'Disabled'/'Enabled' from webUI while
hv enabled/disabled the cpu sharing.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-25 14:28:07 +08:00
Zide Chen fc78013fba acrn-config: some cleanup for logical partition mode Linux bootargs
- commit 69152647 ("hv: Use virtual APIC IDs for Pre-launched VMs")
  enables virtual APIC IDs for pre-launched VMs thus xapic_phys is no
  longer needed to force guest xAPIC to work in physical destination mode.

- HVC is not available in logical partition mode and "console=hvc0" should
  be removed from guest Linux bootargs.

Tracked-On: #3854
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-25 13:46:37 +08:00
Wei Liu 651510a8d1 acrn-config: add 'logger_setting' into launch script
Add missed definition of 'logger_setting' into launch script.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-24 14:56:22 +08:00
Wei Liu 7f74e6e9a9 acrn-config: refine mount device for virtio-blk
Previous launch config tool doesn't handle the situation that
'virtio-blk' is set with rootfs partition with rootfs image,
in such scenario, VM would be failed to start when launching
This patch refine the mount device while use rootfs partiton and image
from vritio block device.

Tracked-On: #4248
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-24 14:56:22 +08:00
Wei Liu fc357a7782 acrn-config: add 'tap_' perfix for virtio-net
UOS would be failed to get ip address, add 'tap_' perfix for virtio-net
name setting.

Tracked-On: #4255
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-24 14:56:22 +08:00
Wei Liu 5b6a33bb34 acrn-config: enable log_setting in all VMs
enable log_setting for all VMs.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-24 14:56:22 +08:00
Wei Liu bb6e28e183 acrn-config: check pass-thruogh device for audio/audio_codec
Add this check while validating audio/audio_codec for pass-through
device setting.

Tracked-On: #4249
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-24 14:56:22 +08:00
Wei Liu 4234d2e4d3 acrn-config: correct vuart1 setting in scenario config
The 'vuart1' item is selectable from webUI, but in some case user
might select vuart1 in industry scenario by mistake. If config tool
set them in vm configurations directly without checking, the
hypervisor might be failed to boot.
This patch will check such case and set the correct vuart1 in vm
configurations.

Tracked-On: #4247
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-24 14:56:22 +08:00
Chen, Zide d80a0dcea0 acrn-config: fix a few formatting issues
scenario_cfg_lib.py:
  - removed extra white space before ','

pci_dev_c.py:
  - follow style in other files, added two empty lines
  - removed extra line at the end of the .c file

vm_configurations_c.py
  - alignment

vm_configurations_h.py
  - alignment

Tracked-On: #3602
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-24 14:53:32 +08:00
Wei Liu 051f277cba acrn-config: modify hpa start size value for logical_partition scenario
Modify the hpa start size value for logical_partition scenario to avoid
build issue, and make the memory size of pre-launched VM configurable.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-23 16:55:32 +08:00
Wei Liu 197e4a0620 acrn-config: add support to parse 'severity' item tag
Add support to parse 'severity' item tag from webUI and set them into
scenario configurations.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-23 15:15:09 +08:00
Wei Liu ca2855f230 acrn-config: add severity setting to scenario config xml
To keep align hypervisor source code for scenario config, need add
the 'severity' item tag into scenario config files.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-23 15:15:09 +08:00
Wei Liu fcb85a806d acrn-config: remove pcpu3 from vm1 in SDC scenario
Currently kata vm is supported in SDC scenario by default, both vm1
and kata vm would share pcpu id 3 for vcpu affinity even when cpu
sharing is not enabled.
Remove pcpu id 3 from vm1 in SDC scenario config xmls.

Tracked-On: #4286
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-23 10:15:06 +08:00
Deb Taylor ba5099e69f Doc: Content edits to the acrntrace README file.
Signed-off-by: Deb Taylor <deb.taylor@intel.com>
2019-12-16 16:25:15 -05:00
Wei Liu 98b3dd9426 acrn-config: set HV_RAM_START above 256M for new board
Hv could be failed when hv ram start address when around 16, beacause when
booting from grub mode, hv and sos ram address would be overlaped.
This patch set the HV_RAM_START address above 256M for new board.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-13 13:48:14 +08:00
Wei Liu 464639e8d3 acrn-config: add 'ramdisk_mod' item tag for tgl-rvp
Add missing 'ramdisk_mod' item tag of industry config xml for tgl-rvp.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-13 13:48:14 +08:00
Wei Liu 13d6b69d65 acrn-config: set DRHDx_IGNORE while no DEV_SCOPE in DRHD
Set the DRHDx_IGNORE to false even there is no DEV_SCOPE under this
DRHD.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-13 13:48:14 +08:00
Wei Liu 12a9bc29df acrn-config: add CONFIG_SERIAL_x for new board
Add CONFIG_SERIAL_x in $(borad).config, this will help to output
console log and help new board debug.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-13 13:48:14 +08:00
Wei Liu d699347e7b acrn-config: change gvt_args from selectbox to editbox
1. Some VMs don't need pci-gvt args or or need specific configuration
for 'gvt_args' item tag, this patch changes from selectable behavior to
editable for 'gvt_args' item from webUI.

2. Modify the description for gvt_args item tag from launch config xmls.

Tracked-On: #3854
Signed-off-by: Wei Liu <weix.w.liu@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
2019-12-13 13:48:14 +08:00