From 7e1ac8a74e4037273ec83651244d9b89241657fe Mon Sep 17 00:00:00 2001 From: Zide Chen Date: Thu, 25 Mar 2021 12:46:25 -0700 Subject: [PATCH] config-tools: add NVMX_ENABLED feature and GUEST_FLAG_NVMX_ENABLED flag NVMX_ENABLED: ACRN is built to support nested virtualization if set. GUEST_FLAG_NVMX_ENABLED: indicates that the VMX capability can be present in this guest to run nested VMs. Tracked-On: #5923 Signed-off-by: Zide Chen Acked-by: Eddie Dong --- hypervisor/include/public/acrn_common.h | 1 + misc/config_tools/schema/VMtypes.xsd | 4 +++- misc/config_tools/schema/config.xsd | 6 ++++++ misc/config_tools/xforms/config_common.xsl | 4 ++++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hypervisor/include/public/acrn_common.h b/hypervisor/include/public/acrn_common.h index 6bed48b91..6e1de55b7 100644 --- a/hypervisor/include/public/acrn_common.h +++ b/hypervisor/include/public/acrn_common.h @@ -52,6 +52,7 @@ #define GUEST_FLAG_IO_COMPLETION_POLLING (1UL << 2U) /* Whether need hypervisor poll IO completion */ #define GUEST_FLAG_HIDE_MTRR (1UL << 3U) /* Whether hide MTRR from VM */ #define GUEST_FLAG_RT (1UL << 4U) /* Whether the vm is RT-VM */ +#define GUEST_FLAG_NVMX_ENABLED (1UL << 5U) /* Whether this VM supports nested virtualization */ /* TODO: We may need to get this addr from guest ACPI instead of hardcode here */ #define VIRTUAL_SLEEP_CTL_ADDR 0x400U /* Pre-launched VM uses ACPI reduced HW mode and sleep control register */ diff --git a/misc/config_tools/schema/VMtypes.xsd b/misc/config_tools/schema/VMtypes.xsd index 329d5ba26..7b9046cd7 100644 --- a/misc/config_tools/schema/VMtypes.xsd +++ b/misc/config_tools/schema/VMtypes.xsd @@ -36,7 +36,8 @@ - ``GUEST_FLAG_IO_COMPLETION_POLLING`` specify that the hypervisor needs IO polling to completion - ``GUEST_FLAG_HIDE_MTRR`` specify that MTRR is hidden from the VM -- ``GUEST_FLAG_RT`` specify that the VM is an RT-VM (real-time) +- ``GUEST_FLAG_RT`` specify that the VM is an RT-VM (real-time) +- ``GUEST_FLAG_NVMX_ENABLED`` specify that the VM supports nested virtualization @@ -47,6 +48,7 @@ + diff --git a/misc/config_tools/schema/config.xsd b/misc/config_tools/schema/config.xsd index 0779b7372..778098e7c 100644 --- a/misc/config_tools/schema/config.xsd +++ b/misc/config_tools/schema/config.xsd @@ -123,6 +123,11 @@ support RDT or CDP, setting this option to ``y`` is ignored. Enable Hyper-V. + + + Enable nested virtualization. + + Specify if the IOMMU enforces snoop behavior @@ -158,6 +163,7 @@ Machine Check Error on Page Size Change. + diff --git a/misc/config_tools/xforms/config_common.xsl b/misc/config_tools/xforms/config_common.xsl index 487437a7e..a6057ed9e 100644 --- a/misc/config_tools/xforms/config_common.xsl +++ b/misc/config_tools/xforms/config_common.xsl @@ -95,6 +95,10 @@ + + + +