mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-01 20:05:30 +00:00
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>
81 lines
3.7 KiB
XML
81 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!-- Copyright (C) 2021 Intel Corporation. All rights reserved. -->
|
|
<!-- SPDX-License-Identifier: BSD-3-Clause -->
|
|
|
|
<xsl:stylesheet
|
|
version="1.0"
|
|
xmlns:xi="http://www.w3.org/2003/XInclude"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
xmlns:dyn="http://exslt.org/dynamic"
|
|
xmlns:math="http://exslt.org/math"
|
|
xmlns:acrn="http://projectacrn.org">
|
|
<xsl:include href="lib.xsl" />
|
|
<xsl:output method="text" />
|
|
|
|
<xsl:template match="/acrn-offline-data">
|
|
<!-- Declaration of license -->
|
|
<xsl:value-of select="$license" />
|
|
|
|
<!-- Header include guard -->
|
|
<xsl:value-of select="acrn:include-guard('VM_CONFIGURATIONS_H')" />
|
|
|
|
<!-- Included headers -->
|
|
<xsl:value-of select="acrn:include('misc_cfg.h')" />
|
|
<xsl:value-of select="acrn:include('pci_devices.h')" />
|
|
|
|
<xsl:apply-templates select="config-data/acrn-config" />
|
|
|
|
<xsl:value-of select="acrn:include-guard-end('VM_CONFIGURATIONS_H')" />
|
|
</xsl:template>
|
|
|
|
<xsl:template match="config-data/acrn-config">
|
|
<xsl:call-template name="vm_count" />
|
|
<xsl:call-template name="dm_guest_flag" />
|
|
<xsl:call-template name="pre_launched_vm_hpa" />
|
|
<xsl:call-template name="sos_vm_bootarges" />
|
|
</xsl:template>
|
|
|
|
<xsl:template name ="vm_count">
|
|
<xsl:value-of select="acrn:comment('SERVICE_VM_NUM can only be 0U or 1U; When SERVICE_VM_NUM is 0U, MAX_POST_VM_NUM must be 0U too; MAX_POST_VM_NUM must be bigger than CONFIG_MAX_KATA_VM_NUM.')" />
|
|
<xsl:value-of select="$newline" />
|
|
<xsl:value-of select="acrn:define('PRE_VM_NUM', count(vm[acrn:is-pre-launched-vm(vm_type)]), 'U')" />
|
|
<xsl:value-of select="acrn:define('SERVICE_VM_NUM', count(vm[acrn:is-sos-vm(vm_type)]), 'U')" />
|
|
<xsl:value-of select="acrn:define('MAX_POST_VM_NUM', count(vm[acrn:is-post-launched-vm(vm_type)]), 'U')" />
|
|
<xsl:value-of select="acrn:define('CONFIG_MAX_KATA_VM_NUM', count(vm[acrn:is-kata-vm(vm_type)]), 'U')" />
|
|
</xsl:template>
|
|
|
|
<xsl:template name ="dm_guest_flag">
|
|
<xsl:choose>
|
|
<xsl:when test="count(vm[vm_type='SOS_VM'])">
|
|
<xsl:value-of select="acrn:comment('Bitmask of guest flags that can be programmed by device model. Other bits are set by hypervisor only.')" />
|
|
<xsl:value-of select="$newline" />
|
|
<xsl:value-of select="acrn:define('DM_OWNED_GUEST_FLAG_MASK', '(GUEST_FLAG_SECURE_WORLD_ENABLED | GUEST_FLAG_LAPIC_PASSTHROUGH | GUEST_FLAG_RT | GUEST_FLAG_IO_COMPLETION_POLLING | GUEST_FLAG_SECURITY_VM)', '')" />
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:value-of select="acrn:define('DM_OWNED_GUEST_FLAG_MASK', '0', 'UL')" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:template>
|
|
|
|
<xsl:template name ="sos_vm_bootarges">
|
|
<xsl:if test="count(vm[vm_type='SOS_VM'])">
|
|
<xsl:value-of select="acrn:comment(concat('SOS_VM == VM', vm[vm_type='SOS_VM']/@id))" />
|
|
<xsl:value-of select="$newline" />
|
|
<xsl:value-of select="acrn:define('SERVICE_VM_OS_BOOTARGS', 'SERVICE_VM_ROOTFS SERVICE_VM_OS_CONSOLE SERVICE_VM_IDLE SOS_BOOTARGS_DIFF', '')" />
|
|
</xsl:if>
|
|
</xsl:template>
|
|
|
|
<xsl:template name ="pre_launched_vm_hpa">
|
|
<xsl:for-each select="vm">
|
|
<xsl:if test="acrn:is-pre-launched-vm(vm_type)">
|
|
<xsl:value-of select="acrn:define(concat('VM', @id, '_CONFIG_MEM_START_HPA'), memory/start_hpa, 'UL')" />
|
|
<xsl:value-of select="acrn:define(concat('VM', @id, '_CONFIG_MEM_SIZE'), memory/size, 'UL')" />
|
|
<xsl:value-of select="acrn:define(concat('VM', @id, '_CONFIG_MEM_START_HPA2'), memory/start_hpa2, 'UL')" />
|
|
<xsl:value-of select="acrn:define(concat('VM', @id, '_CONFIG_MEM_SIZE_HPA2'), memory/size_hpa2, 'UL')" />
|
|
</xsl:if>
|
|
</xsl:for-each>
|
|
</xsl:template>
|
|
|
|
</xsl:stylesheet>
|