Commit Graph

313 Commits

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