xen: refactor Xen hypervisor Kconfig options
Xen-related Kconfig options were highly dependand on BOARD/SOC xenvm. It is not correct because Xen support may be used on any board and SoC. So, Kconfig structure was refactored, now CONFIG_XEN is located in arch/ directory (same as in Linux kernel) and can be selected for any Cortex-A arm64 setup (no other platforms are currently supported). Also remove confusion in Domain 0 naming: Domain-0, initial domain, Dom0, privileged domain etc. Now all options related to Xen Domain 0 will be controlled by CONFIG_XEN_DOM0. Signed-off-by: Dmytro Firsov <dmytro_firsov@epam.com>
This commit is contained in:
parent
66dfe7b99a
commit
c9d2fb7d40
|
@ -54,4 +54,4 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
|||
zephyr_cc_option(-moverride=tune=no_ldp_stp_qregs)
|
||||
endif()
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_SOC_XENVM xen)
|
||||
add_subdirectory_ifdef(CONFIG_XEN xen)
|
||||
|
|
|
@ -197,6 +197,8 @@ config ARMV8_A
|
|||
so that it can support some features included in the AArch64 state.
|
||||
It supports the T32 and A32 instruction sets.
|
||||
|
||||
rsource "xen/Kconfig"
|
||||
|
||||
endif # CPU_CORTEX_A
|
||||
|
||||
if CPU_AARCH64_CORTEX_R
|
||||
|
|
20
arch/arm64/core/xen/Kconfig
Normal file
20
arch/arm64/core/xen/Kconfig
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Xen hypervisor configuration options
|
||||
|
||||
# Copyright (c) 2023 EPAM Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config XEN
|
||||
bool
|
||||
default y
|
||||
depends on ARMV8_A
|
||||
depends on DT_HAS_XEN_XEN_ENABLED
|
||||
help
|
||||
Enables support of Xen hypervisor on arm64 platform. Get enabled
|
||||
when board device tree contains "hypervisor" node with "xen,xen"
|
||||
compatible enabled.
|
||||
|
||||
config XEN_DOM0
|
||||
bool "Zephyr as Xen Domain 0"
|
||||
depends on XEN
|
||||
help
|
||||
Built binary will be used as Xen privileged domain (Domain 0).
|
|
@ -15,7 +15,7 @@ add_subdirectory(usb_c)
|
|||
add_subdirectory_ifdef(CONFIG_ADC adc)
|
||||
add_subdirectory_ifdef(CONFIG_AUDIO audio)
|
||||
add_subdirectory_ifdef(CONFIG_BBRAM bbram)
|
||||
add_subdirectory_ifdef(CONFIG_BOARD_XENVM xen)
|
||||
add_subdirectory_ifdef(CONFIG_XEN xen)
|
||||
add_subdirectory_ifdef(CONFIG_BT_DRIVERS bluetooth)
|
||||
add_subdirectory_ifdef(CONFIG_CACHE_MANAGEMENT cache)
|
||||
add_subdirectory_ifdef(CONFIG_CAN can)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Xen hypervisor console via UART setup
|
||||
#
|
||||
# Copyright (c) 2021 EPAM Systems
|
||||
# Copyright (c) 2021-2023 EPAM Systems
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
|
@ -10,7 +10,7 @@ config UART_XEN_HVC
|
|||
depends on DT_HAS_XEN_HVC_UART_ENABLED
|
||||
select SERIAL_HAS_DRIVER
|
||||
select SERIAL_SUPPORT_INTERRUPT
|
||||
depends on !XEN_INITIAL_DOMAIN
|
||||
depends on XEN && !XEN_DOM0
|
||||
help
|
||||
Enable Xen ring buffer based hypervisor console driver. Used
|
||||
for Zephyr as unprivileged domain.
|
||||
|
@ -18,8 +18,7 @@ config UART_XEN_HVC
|
|||
config UART_XEN_HVC_CONSOLEIO
|
||||
bool "Xen hypervisor Dom0 console UART driver"
|
||||
select SERIAL_HAS_DRIVER
|
||||
depends on BOARD_XENVM
|
||||
depends on XEN_INITIAL_DOMAIN
|
||||
depends on XEN_DOM0
|
||||
default y
|
||||
help
|
||||
Enable Xen hypervisor console driver. Used for Zephyr as
|
||||
|
@ -35,7 +34,6 @@ config XEN_HVC_INIT_PRIORITY
|
|||
|
||||
config XEN_EARLY_CONSOLEIO
|
||||
bool "Early printk/stdout through console_io Xen interface"
|
||||
depends on BOARD_XENVM
|
||||
depends on UART_XEN_HVC
|
||||
help
|
||||
Enable setting of console_io symbol hook for stdout and printk.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (c) 2022 EPAM Systems
|
||||
# Copyright (c) 2022-2023 EPAM Systems
|
||||
|
||||
if SOC_XENVM
|
||||
if XEN
|
||||
|
||||
menu "Xen drivers"
|
||||
|
||||
|
@ -22,4 +22,4 @@ config XEN_GRANT_TABLE_INIT_PRIORITY
|
|||
|
||||
endmenu
|
||||
|
||||
endif # SOC_XENVM
|
||||
endif # XEN
|
||||
|
|
|
@ -6,9 +6,3 @@ config SOC_XENVM
|
|||
select ARM64
|
||||
select ARM_ARCH_TIMER if SYS_CLOCK_EXISTS
|
||||
select CPU_CORTEX_A72
|
||||
|
||||
config XEN_INITIAL_DOMAIN
|
||||
bool "Zephyr as Xen Domain 0"
|
||||
depends on SOC_XENVM
|
||||
help
|
||||
Built binary will be used as Xen privileged domain.
|
||||
|
|
Loading…
Reference in a new issue