Commit Graph

14 Commits

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