Commit Graph

64 Commits

Author SHA1 Message Date
jackwhich 4169bfc21c config-tools: updated nuc11/whl board files
Because the board inspector update uses XPATH
to extract available PCI devices or serial ports,
So the board xmls need to be updated for all boards.

Tracked-On: #6690
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-03-30 11:42:25 +08:00
Kunhui-Li e1f5c32ea2 config_tools: remove CONFIG_IOMMU_BUS_NUM
Since PR #6943 has landed, the `CONFIG_IOMMU_BUS_NUM` has been renamed
to `ACFG_MAX_PCI_BUS_NUM`, this patch removes the obsolete code about
`CONFIG_IOMMU_BUS_NUM`.

v1-->v2:
Update the upgrader.py to add a description of this obsoleted item.

Tracked-On: #6942
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-03-22 16:37:13 +08:00
jackwhich f8763cc953 config-tools: remove WHL sdc scenario/launch file
Because there is no SDC scenario in the generic template,
We remove the SDC specific scenario

Tracked-On: #6701
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-03-21 15:04:38 +08:00
Junjie Mao 0d84ecc4a1 config_tools: merge data in launch XMLs into scenario XMLs
Splitting the definitions of a post-launched VM into two files, namely the
scenario XML and launch XML, introduces duplicated field in both files and
leads to a high probability of having inconsistencies between them (see
issue #7156 as an example). Further more, this split has also adds much
complexity to the configurator which has to either hide some of the items
from user interfaces or synchronize different fields upon changes.

The advantage of the split, however, is not widely adopted. Having a
separate XML capturing the VM definition tweakable in the service VM at
runtime seems to give users more flexibility to redefine a VM without
recompiling the hypervisor. But that is not a common practice in the
industry segment; instead it is preferred to have a static scenario
definition to make sure that all resources are allocated carefully in a
fixed manner in order for better determinism.

As a result, this patch merges the fields in launch XMLs into the schema of
scenario XMLs. Some fields are post-launched VM specific and thus added,
while the others have similar items in scenario XMLs today.

The launch script generator is also updated accordingly to generate launch
scripts from the new scenario XMLs (which now contain the same amount of
information as previous launch XMLs).

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Junjie Mao 678879fd34 config_tools: more annotation on the config items
This patch adds the following annotations to the config items defined in
the schema of scenario XMLs:

  - acrn:title, which defines the human-readable label of the corresponding
    widgets in the configurator.

  - acrn:views, which controls in which view(s) this item shows in the
    configurator.

  - acrn:applicable-vms, which specifies the kinds of VMs (pre-launched,
    post-launched and/or service VM) this item applies to. An item not
    applicable to a certain type of VM will not be shown in the
    configurator, and will trigger validation error if that item exists for
    a VM of that specific type.

v1 -> v2:

  * Preserve the CPU affinity settings for service VMs. This will be needed
    later when we want to restrict the available CPUs the service VM can use at
    runtime (but not at initialization time).

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Junjie Mao f392164b40 config_tools: add ivshmem providers
A shared memory region can be provided either by the hypervisor or by the
device model. Before recent schema changes this is telled by the "hv:/" or
"dm:/" prefix.

This patch adds another node under an IVSHMEM region to represent the
provider, following the practice that information in the old-school
encodings is split and put as separate XML nodes.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Junjie Mao 609e09cf37 config_tools: drop obsolete config items
This patch drops a few config items which are no longer needed, including:

  - vm.os_config.name
  - vm.UEFI_OS_LOADER_NAME
  - vm.pci_dev_num

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Junjie Mao e88532b59d config_tools: refine console virtual UARTs
As is recommended by UX/DX reviews, the per-VM console virtual UART is now
limited to the following choices:

  - Disabled
  - a COM port from COM1 to COM4
  - PCI based

This patch converts the schema of scenario XMLs to integrate this
recommendation and add logic in the scenario upgrader to migrate data from
old scenario XMLs.

v1 -> v2:

  * Update the static allocators and C source transformers according to the
    new console vUART config item.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Junjie Mao 7ad9596dd6 config_tools: change representation of build types
Instead of using a Boolean variable indicating whether a build is for debug
or release, it is more intuitive to specify the build types as "debug" or
"release".

This patch converts the config item RELEASE to BUILD_TYPE which takes
"debug" or "release" as of now.

The generated header and makefile still uses RELEASE, and the command line
option RELEASE=<y or n> is also preserved.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Junjie Mao 7a1fbcf51f config_tools: add upgrader of scenario XMLs
With a bunch of dramatic improvement to the schema of scenario XML
recently, it is now non-trivial for users of previous releases to migrate
their scenario definitions to the next-gen schema, which will be a
major obstacle when upgrading to the next ACRN release.

In order to ease the upgrade of scenario XML, this patch introduces a
script that takes a scenario XML of previous releases and generates a new
one which satisfies the latest schema. The major data that can be migrated
include:

  - Virtual UART and shared memory configurations

  - VM types, load_order and guest flags

Other data are preserved as long as they are still needed according to the
schema. The script to print a list that summarizes the data that are
unintendedly discarded during the upgrade, so that users can double check
the results and edit the generated scenario using the configurator.

The upgrader share the same command-line interface of the default value
populator and scenario validator.

More upgrading logic will be added at the same time the schema is changed.

v1 -> v2:
  * The upgrader now pretty-prints the upgraded XML.
  * Apply the upgrader to the current scenario XMLs in the repo. The
    ordering of nodes are adjusted to align with the schema, but no
    essential changes are made.
  * Set the log level to INFO.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-15 10:22:37 +08:00
Chenli Wei 71129879d1 misc: modify vuart config for xmls
We have redesign the vuart and the UI for user, so the config tool
should change the schema and xform for the new xml, then change the
static_allocators to alloc irq for new connection.

This patch modify the xmls for vuart new design.

Tracked-On: #6690
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Chenli Wei <chenli.wei@linux.intel.com>
2022-03-08 17:07:48 +08:00
hangliu1 c2695f290d config tool: remove guest flag for scenario xml
remove guest flags and add lapic_passthrough field

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-03-02 15:50:23 +08:00
Yang,Yu-chu eb78f1bb7c config-tools: add console=ttyS0 to bootargs
Add missing console=ttyS0 to service-VM's bootargs.

Tracked-On: #7127
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2022-02-25 09:31:17 +08:00
hangliu1 9f8231e7ba config tool: xml change for vm_type and load_order
change vm_type and add load_order in all scenario xml

Tracked-On: #6690
Signed-off-by: hangliu1 <hang1.liu@linux.intel.com>
2022-02-22 16:25:27 +08:00
Kunhui-Li 55ced4e79f config_tools: remove PLATFORM_RAM_SIZE
Since PR #7113 has landed, we also remove PLATFORM_RAM_SIZE in the related
Python code, schema and all existing scenario XML files.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-02-22 08:36:11 +08:00
Yuanyuan Zhao 34037b88e0 config tool: modify ivshmem config for scenario.xml
Rewrite the configuration of ivshmem in scenario.xml according to
the format of new UI design.

Tracked-On: #6690
Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com>
Reviewed-by: Junjie Mao <junjie.mao@intel.com>
2022-02-18 18:42:00 +08:00
Kunhui-Li d78d06c23d config_tools: merge board_private.rootfs and board_private.bootargs to os_config.bootargs
1. remove the board_private tag in the schema and all existing scenario XML files,
and remove the related value check about board_private.rootfs and bootargs.
2. merge board_private.rootfs and board_private.bootargs to os_config.bootargs.
and no change to the related contents of the .c/.h files except the order of
define SERVICE_VM_ROOTFS.
3. update the schema to make os_config.bootargs configurable for service VM in UI.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-01-19 13:14:49 +08:00
Kunhui-Li 02268941d8 config_tools: remove the parameters "pm_notify_channel" and "pm_by_vuart" of acrn-dm
Since PR #7002 has removed "pm_notify_channel" and "pm_by_vuart"
from acrn-dm usage, this patch also removes the two parameters
in the launch script generation logic.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2022-01-19 08:52:51 +08:00
jackwhich 63d3a54285 config_tool: update generic/nuc11/whl/cfl board xmls
1.Re-obtain  generic/nuc11/whl/cfl board xmls according to 6987.patch.
2.Modify the corresponding scenario pci.
3.Add cfl-k700-i7 scenario (hybrid/partitioned) and launch xml files.

Tracked-On: #6986
Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2022-01-14 08:52:44 +08:00
Kunhui-Li de5abd5265 config_tools: remove CONFIG_LOG_DESTINATION
1. remove LOG_DESTINATION in the related python code, schema and
all existing scenario XML files.
2. for MEM_LOGLEVEL, NPK_LOGLEVEL and CONSOLE_LOGLEVEL,
update the loglevel range to [0, 5] from [0, 6].

Tracked-On: #6934
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2021-12-06 14:24:40 +08:00
Kunhui-Li 11fb6341be config_tools: remove LOG_BUF_SIZE
remove LOG_BUF_SIZE in the related python code, schema and
all existing scenario XML files.

Tracked-On: #6690
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
2021-12-01 08:53:33 +08:00
Kunhui-Li 711619f92e config_tools: remove CONFIG_MAX_IR_ENTRIES
remove CONFIG_MAX_IR_ENTRIES the related python code, schema and
all existing scenario XML files since PR #6809 have changed it.

Tracked-On: #6745
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-25 13:37:22 +08:00
Kunhui-Li 11230765c1 config_tools: remove LOW_RAM_SIZE
remove LOW_RAM_SIZE in the related python code, schema and
all existing scenario XMLs because PR #6791 have removed it.

Tracked-On: #6805
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-24 20:54:57 +08:00
Weiyi Feng ae5cec9a98 config_tool: update scenario xml for MAX_VM_NUM field
update scenario xml for MAX_VM_NUM field

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng ed5d28a840 config_tool: update scenario and launch xml for vm_name support
update scenario and launch xml for vm_name support

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Weiyi Feng c74ac12165 config_tool: reformat scenario and launch xml
reformat scenario and launch xml

Tracked-On: #6685
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-16 14:42:59 +08:00
Kunhui-Li ccbf6d4603 config_tools: remove KATA and replace UUID with vmname to identify a vm
1. remove CONFIG_KATA_VM, CONFIG_MAX_KATA_VM_NUM and KATA_VM
related code.
2. remove KATA_VM in scenario xml files.
3. remove KATA vm type in UI.
4. remove UUID DB.
5. remove uuid in the launch script generation logic.
6. use vmname to identify a vm. (eg: <name>ACRN_SOS_VM</name>)
add the check logic to ensure vm name is a must-set item, not duplicated,
and the string length is [1-15] and the whitespace is not allowed.
7. enlarge the max VM num to 32.

Tracked-On: #6685
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-16 14:42:59 +08:00
Victor Sun f8bb2064a4 config_tools: remove config of MAX_EFI_MMAP_ENTRIES
The config of MAX_EFI_MMAP_ENTRIES has been removed in hypervisor, so remove
this config in config_tools;

Tracked-On: #6442

Signed-off-by: Victor Sun <victor.sun@intel.com>
2021-11-08 09:49:24 +08:00
Kunhui-Li 2f5db5f4ee Revert "misc: config_tools: add vuart for communication"
This reverts commit 9e2edd5192.
Because config UI don't support multi legacy vuart in current logic,
we need to revert the commit to unblock UI.

Tracked-On: #6652
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-11-04 10:20:16 +08:00
Liu Long 7f846b7ecf Rename the xml file and generate launch script from uos to user_vm.
Tracked-On: #6744
Signed-off-by: Liu Long long.liu@linux.intel.com

Signed-off-by: Liu Long <long.liu@linux.intel.com>
2021-11-03 12:02:30 +08:00
Xiangyang Wu 9e2edd5192 misc: config_tools: add vuart for communication
In this patch, add vuart configuration in scenario XML of
each board to support communication between service VM and
user VM since system shutdown feature need to send commands
through this vuart communication channel.

The follow changes are made in this patch:
- Add multi legacy vuart for service VM for communication
- Add one legacy vuart for user VM for communication
- Add 8250.nr_uarts parameter in command line of service OS

Tracked-On: #6652
Signed-off-by: Xiangyang Wu <xiangyang.wu@intel.com>
2021-11-03 09:13:41 +08:00
Weiyi Feng 648b880f89 config_tools: Update launch xml for Sriov/GPU passthrough support
1. Update launch xml for Sriov/GPU passthrough support

Tracked-On: #6290
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-11-02 18:30:54 +08:00
Liu Long 3f4ea38158 ACRN: misc: Unify terminology for service vm/user vm
Rename SOS_VM type to SERVICE_VM
rename UOS to User VM in XML description
rename uos_thread_pid to user_vm_thread_pid
rename devname_uos to devname_user_vm
rename uosid to user_vmid
rename UOS_ACK to USER_VM_ACK
rename SOS_VM_CONFIG_CPU_AFFINITY to SERVICE_VM_CONFIG_CPU_AFFINITY
rename SOS_COM to SERVICE_VM_COM
rename SOS_UART1_VALID_NUM" to SERVICE_VM_UART1_VALID_NUM
rename SOS_BOOTARGS_DIFF to SERVICE_VM_BOOTARGS_DIFF
rename uos to user_vm in launch script and xml

Tracked-On: #6744
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-11-02 10:00:55 +08:00
Liu Long 14c6e21efa ACRN: misc: Unify terminology for sos/uos rin macro
Rename SOS_VM_NUM to SERVICE_VM_NUM.
rename SOS_SOCKET_PORT to SERVICE_VM_SOCKET_PORT.
rename PROCESS_RUN_IN_SOS to PROCESS_RUN_IN_SERVICE_VM.
rename PCI_DEV_TYPE_SOSEMUL to PCI_DEV_TYPE_SERVICE_VM_EMUL.
rename SHUTDOWN_REQ_FROM_SOS to SHUTDOWN_REQ_FROM_SERVICE_VM.
rename PROCESS_RUN_IN_SOS to PROCESS_RUN_IN_SERVICE_VM.
rename SHUTDOWN_REQ_FROM_UOS to SHUTDOWN_REQ_FROM_USER_VM.
rename UOS_SOCKET_PORT to USER_VM_SOCKET_PORT.
rename SOS_CONSOLE to SERVICE_VM_OS_CONSOLE.
rename SOS_LCS_SOCK to SERVICE_VM_LCS_SOCK.
rename SOS_VM_BOOTARGS to SERVICE_VM_OS_BOOTARGS.
rename SOS_ROOTFS to SERVICE_VM_ROOTFS.
rename SOS_IDLE to SERVICE_VM_IDLE.
rename SEVERITY_SOS to SEVERITY_SERVICE_VM.
rename SOS_VM_UUID to SERVICE_VM_UUID.
rename SOS_REQ to SERVICE_VM_REQ.
rename RTCT_NATIVE_FILE_PATH_IN_SOS to RTCT_NATIVE_FILE_PATH_IN_SERVICE_VM.
rename CBC_REQ_T_UOS_ACTIVE to CBC_REQ_T_USER_VM_ACTIVE.
rename CBC_REQ_T_UOS_INACTIVE to CBC_REQ_T_USER_VM_INACTIV.
rename uos_active to user_vm_active.

Tracked-On: #6744
Signed-off-by: Liu Long <long.liu@linux.intel.com>
Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
2021-11-02 10:00:55 +08:00
jackwhich 54aba7a858 config_tools: update all board file and scenario file
We should generate new board xmls for cfl,whl and nuc11 because of the
board inspector changes. For the details refer to these RPs:#6699 #6710

Tracked-On:#6709

Signed-off-by: zhongzhenx.liu <zhongzhenx.liu@intel.com>
2021-10-27 09:54:58 +08:00
Kunhui-Li 5d6f4b3813 config_tools: remove hvlog and memmap parameter in bootargs
remove hvlog and memmap parameter in bootargs for whl-ipc-i5
scenario xml files.

Tracked-On: #6663
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-10-26 18:17:40 +08:00
dongshen 3ddcbd424f config_tools: add config UI support for vCAT
Tracked-On: #5917
Signed-off-by: Weiyi Feng <weiyix.feng@intel.com>
2021-10-26 11:48:27 +08:00
Kunhui-Li 66bbf6f751 config_tools: remove HV_RAM_SIZE
1. remove HV_RAM_SIZE and CONFIG_HV_RAM_SIZE in the related python
code, schema and all existing scenario XMLs because PR 6664 has
changed it in HV side.
2. set HV_RAM_START default value to 2M.

Tracked-On: #6663
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-10-25 15:47:24 +08:00
Kunhui-Li b5b109dc64 config_tools: rename scenario xml
rename the industry folder to shared folder ,and also rename the
logical_partition folder to partitioned under the generic_code directory.

Tracked-On: #6315
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-09-02 10:01:25 +08:00
Kunhui-Li eee6244225 config_tools: rename scenario xml
1. Rename industry.xml to shared.xml
2. Rename logical_partition.xml to partitioned.xml.
3. Update the name in view.py correspondingly.

Tracked-On: #6315
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-09-02 10:01:25 +08:00
Kunhui-Li 30dd62e5d1 config_tools: update xml files
1. set the content of the bootargs tag to empty for KERNEL_ELF type
in hybrid xml files.
2. update generic_board.xml with the latest nuc11tnbi5.xml to fix
compile fail issue.

Tracked-On: #6461
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-08-26 08:52:07 +08:00
Yang,Yu-chu 2cc85f3d63 config-tools: Kernel load and entry address accept empty string
Allow the kern_load_addr and kern_entry_addr take empty string.

Tracked-On: #6461
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-08-25 10:43:19 +08:00
Shiqing Gao 91777a83b5 config_tools: add a new entry MAX_EFI_MMAP_ENTRIES
It is used to specify the maximum number of EFI memmap entries.

On some platforms, like Tiger Lake, the number of EFI memmap entries
becomes 268 when the BIOS settings are changed.
The current value of MAX_EFI_MMAP_ENTRIES (256) defined in hypervisor
is not big enough to cover such cases.

As the number of EFI memmap entries depends on the platforms and the
BIOS settings, this patch introduces a new entry MAX_EFI_MMAP_ENTRIES
in configurations so that it can be adjusted for different cases.

Tracked-On: #6442

Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
2021-08-20 09:50:39 +08:00
Kunhui-Li a73dd7b5f7 config_tools: disable TPM2 passthrough on other platforms
Disables TPM2 passthrough on other platforms except TGL
follow the 6410 PR.

Tracked-On: #6288
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-08-20 07:53:30 +08:00
Zhou, Wu 2e2730137f HV: Change hybrid.xml default zephyr config to KERNEL_ELF
In the default config file for hybrid scenario, zephyr image was
configured as KERNEL_RAWIMAGE. Now we change them to KERNEL_ELF
for all the platforms. And also kernel mods are changed from
Zephyr_RawImage to Zephyr_ElfImage

Tracked-On: #6323

Signed-off-by: Zhou, Wu <wu.zhou@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2021-08-19 20:00:45 +08:00
Yang,Yu-chu 73dc610d90 config-tool: refine guest kernel types
Rename KERNEL_ZEPHYR to KERNEL_RAWIMAGE. Added new type "KERNEL_ELF".

Add CONFIG_GUEST_KERNEL_RAWIMAGE, CONFIG_GUEST_KERNEL_ELF and/or
CONFIG_GUEST_KERNEL_BZIMAGE to config.h if it's configured.

Tracked-On: #6323

Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
Reviewed-by: Victor Sun <victor.sun@intel.com>
2021-08-19 20:00:45 +08:00
Kunhui-Li 1d952cfba1 config_tools: update the board xml files
update the board xml and related scenario xml files because the
PR 6352 update the board inspector code to get more board info.

Tracked-On: #6298
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-08-13 11:14:54 +08:00
Fei Li 3df703a64e config-tools: add SECURITY_VM_FIXUP config
Add SECURITY_VM_FIXUP config for Security VM whether it needs to do fixup
for TPM2 and SMBIOS

Tracked-On: #6320
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Signed-off-by: Fei Li <fei1.li@intel.com>
2021-08-11 14:45:55 +08:00
Kunhui-Li 54fe6f900b config_tools: update launch xml for only one NVME
Update launch xml to use image to launch hard rt vm since
we changed the platforms from two disk to only one NVME disk.

Tracked-On: #6315
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
2021-08-11 11:49:17 +08:00
Yang,Yu-chu e235d68526 config-tools: add uclock GP switch
A switch to force disable GP for UC lock using scenario configuration.

Tracked-On: #6299
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
2021-07-21 11:28:30 +08:00