mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-06 19:30:46 +00:00
hv: mod: do not use explicit arch name when including headers
Instead of "#include <x86/foo.h>", use "#include <asm/foo.h>". In other words, we are adopting the same practice in Linux kernel. Tracked-On: #5920 Signed-off-by: Liang Yi <yi.liang@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
@@ -15,9 +15,9 @@ class RDT(enum.Enum):
|
||||
MBA = 2
|
||||
|
||||
INCLUDE_HEADER = """
|
||||
#include <x86/board.h>
|
||||
#include <x86/vtd.h>
|
||||
#include <x86/msr.h>
|
||||
#include <asm/board.h>
|
||||
#include <asm/vtd.h>
|
||||
#include <asm/msr.h>
|
||||
#include <pci.h>
|
||||
#include <misc_cfg.h>
|
||||
"""
|
||||
|
@@ -19,7 +19,7 @@ import vbar_base_h
|
||||
ACRN_PATH = common.SOURCE_ROOT_DIR
|
||||
ACRN_CONFIG_DEF = ACRN_PATH + "misc/config_tools/data/"
|
||||
|
||||
ACRN_DEFAULT_ACPI = ACRN_PATH + "hypervisor/include/arch/x86/default_acpi_info.h"
|
||||
ACRN_DEFAULT_ACPI = ACRN_PATH + "hypervisor/include/arch/x86/asm/default_acpi_info.h"
|
||||
GEN_FILE = ["pci_devices.h", "board.c", "platform_acpi_info.h", "misc_cfg.h",
|
||||
"board_info.h", "vbar_base.h"]
|
||||
|
||||
|
@@ -4,11 +4,11 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <pci_devices.h>
|
||||
#include <vpci.h>
|
||||
#include <vbar_base.h>
|
||||
#include <x86/mmu.h>
|
||||
#include <x86/page.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
|
||||
|
@@ -4,5 +4,5 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
struct pt_intx_config vm0_pt_intx[1U];
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <vuart.h>
|
||||
#include <x86/pci_dev.h>
|
||||
#include <asm/pci_dev.h>
|
||||
extern struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
|
||||
extern struct pt_intx_config vm0_pt_intx[1U];
|
||||
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#define IVSHMEM_CFG_H
|
||||
|
||||
#include <ivshmem.h>
|
||||
#include <x86/pgtable.h>
|
||||
#include <asm/pgtable.h>
|
||||
#define IVSHMEM_SHM_REGION_0 "hv:/shm_region_0"
|
||||
|
||||
/* The IVSHMEM_SHM_SIZE is the sum of all memory regions. The size range of each memory region is [2MB, 512MB] and is a
|
||||
|
@@ -4,12 +4,12 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <pci_devices.h>
|
||||
#include <vpci.h>
|
||||
#include <vbar_base.h>
|
||||
#include <x86/mmu.h>
|
||||
#include <x86/page.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/page.h>
|
||||
#include <ivshmem_cfg.h>
|
||||
|
||||
/*
|
||||
|
@@ -4,5 +4,5 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
struct pt_intx_config vm0_pt_intx[1U];
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <vuart.h>
|
||||
#include <x86/pci_dev.h>
|
||||
#include <asm/pci_dev.h>
|
||||
extern struct acrn_vm_pci_dev_config vm0_pci_devs[VM0_CONFIG_PCI_DEV_NUM];
|
||||
extern struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
|
||||
extern struct acrn_vm_pci_dev_config vm2_pci_devs[VM2_CONFIG_PCI_DEV_NUM];
|
||||
|
@@ -4,11 +4,11 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <pci_devices.h>
|
||||
#include <vpci.h>
|
||||
#include <vbar_base.h>
|
||||
#include <x86/mmu.h>
|
||||
#include <x86/page.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
|
||||
|
@@ -4,5 +4,5 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
struct pt_intx_config vm0_pt_intx[1U];
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <vuart.h>
|
||||
#include <x86/pci_dev.h>
|
||||
#include <asm/pci_dev.h>
|
||||
extern struct acrn_vm_pci_dev_config sos_pci_devs[CONFIG_MAX_PCI_DEV_NUM];
|
||||
extern struct pt_intx_config vm0_pt_intx[1U];
|
||||
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <pci_devices.h>
|
||||
#include <vpci.h>
|
||||
#include <vbar_base.h>
|
||||
#include <x86/mmu.h>
|
||||
#include <x86/page.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/page.h>
|
||||
|
@@ -4,5 +4,5 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
struct pt_intx_config vm0_pt_intx[1U];
|
||||
|
@@ -4,9 +4,9 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <vuart.h>
|
||||
#include <x86/pci_dev.h>
|
||||
#include <asm/pci_dev.h>
|
||||
extern struct pt_intx_config vm0_pt_intx[1U];
|
||||
struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
|
||||
{
|
||||
|
@@ -95,7 +95,7 @@ def generate_file(scenario_items, config):
|
||||
|
||||
if vm_info.shmem.shmem_enabled == 'y':
|
||||
print("#include <ivshmem.h>", file=config)
|
||||
print("#include <x86/pgtable.h>", file=config)
|
||||
print("#include <asm/pgtable.h>", file=config)
|
||||
write_shmem_regions(config)
|
||||
|
||||
print("{0}".format(IVSHMEM_END_DEFINE), file=config)
|
||||
|
@@ -131,12 +131,12 @@ def generate_file(vm_info, config):
|
||||
|
||||
print("{}".format(scenario_cfg_lib.HEADER_LICENSE), file=config)
|
||||
print("", file=config)
|
||||
print("#include <x86/vm_config.h>", file=config)
|
||||
print("#include <asm/vm_config.h>", file=config)
|
||||
print("#include <pci_devices.h>", file=config)
|
||||
print("#include <vpci.h>", file=config)
|
||||
print("#include <vbar_base.h>", file=config)
|
||||
print("#include <x86/mmu.h>", file=config)
|
||||
print("#include <x86/page.h>", file=config)
|
||||
print("#include <asm/mmu.h>", file=config)
|
||||
print("#include <asm/page.h>", file=config)
|
||||
if pci_vuart_enabled:
|
||||
print("#include <vmcs9900.h>", file=config)
|
||||
# Insert header for share memory
|
||||
|
@@ -17,7 +17,7 @@ def generate_file(vm_info, config):
|
||||
|
||||
print("{}".format(scenario_cfg_lib.HEADER_LICENSE), file=config)
|
||||
print("", file=config)
|
||||
print("#include <x86/vm_config.h>", file=config)
|
||||
print("#include <asm/vm_config.h>", file=config)
|
||||
print("", file=config)
|
||||
|
||||
if (board_cfg_lib.is_matched_board(("ehl-crb-b"))
|
||||
|
@@ -9,9 +9,9 @@ import board_cfg_lib
|
||||
import scenario_cfg_lib
|
||||
|
||||
C_HEADER = scenario_cfg_lib.HEADER_LICENSE + r"""
|
||||
#include <x86/vm_config.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <vuart.h>
|
||||
#include <x86/pci_dev.h>
|
||||
#include <asm/pci_dev.h>
|
||||
"""
|
||||
|
||||
def get_pre_vm_type(vm_type, vm_i):
|
||||
|
@@ -29,7 +29,7 @@
|
||||
<xsl:if test="./hv/FEATURES/IVSHMEM/IVSHMEM_ENABLED = 'y'">
|
||||
<!-- Included headers -->
|
||||
<xsl:value-of select="acrn:include('ivshmem.h')" />
|
||||
<xsl:value-of select="acrn:include('x86/pgtable.h')" />
|
||||
<xsl:value-of select="acrn:include('asm/pgtable.h')" />
|
||||
|
||||
<xsl:call-template name="ivshmem_shm_region_name" />
|
||||
<xsl:call-template name="ivshmem_shm_mem" />
|
||||
|
@@ -18,7 +18,7 @@
|
||||
<xsl:value-of select="$license" />
|
||||
|
||||
<!-- Included headers -->
|
||||
<xsl:value-of select="acrn:include('x86/vm_config.h')" />
|
||||
<xsl:value-of select="acrn:include('asm/vm_config.h')" />
|
||||
|
||||
<xsl:apply-templates select="config-data/acrn-config" />
|
||||
</xsl:template>
|
||||
|
@@ -14,9 +14,9 @@
|
||||
<xsl:value-of select="$license" />
|
||||
|
||||
<!-- Included headers -->
|
||||
<xsl:value-of select="acrn:include('x86/vm_config.h')" />
|
||||
<xsl:value-of select="acrn:include('asm/vm_config.h')" />
|
||||
<xsl:value-of select="acrn:include('vuart.h')" />
|
||||
<xsl:value-of select="acrn:include('x86/pci_dev.h')" />
|
||||
<xsl:value-of select="acrn:include('asm/pci_dev.h')" />
|
||||
|
||||
<xsl:apply-templates select="config-data/acrn-config" />
|
||||
</xsl:template>
|
||||
|
@@ -6,9 +6,9 @@
|
||||
|
||||
#include <util.h>
|
||||
#include <acrn_common.h>
|
||||
#include <x86/guest/vcpu.h>
|
||||
#include <x86/mmu.h>
|
||||
#include <x86/guest/trusty.h>
|
||||
#include <asm/guest/vcpu.h>
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/guest/trusty.h>
|
||||
|
||||
#define CAT__(A,B) A ## B
|
||||
#define CAT_(A,B) CAT__(A,B)
|
||||
|
@@ -4,10 +4,10 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <x86/lib/bits.h>
|
||||
#include <x86/page.h>
|
||||
#include <x86/vm_config.h>
|
||||
#include <x86/rdt.h>
|
||||
#include <asm/lib/bits.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/vm_config.h>
|
||||
#include <asm/rdt.h>
|
||||
#include <vuart.h>
|
||||
#include <ivshmem.h>
|
||||
#include <vmcs9900.h>
|
||||
|
Reference in New Issue
Block a user