Commit Graph

392 Commits

Author SHA1 Message Date
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