hv: nested: implement the framework for VMX MSR emulation

Define LIST_OF_VMX_MSRS which includes a list of MSRs that are visible to
L1 guests if nested virtualization is enabled.
- If CONFIG_NVMX_ENABLED is set, these MSRs are included in
  emulated_guest_msrs[].
- otherwise, they are included in unsupported_msrs[].

In this way we can take advantage of the existing infrastructure to
emulate these MSRs.

Tracked-On: #5923
Spick igned-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Zide Chen
2021-05-10 16:29:17 -07:00
committed by wenlingz
parent 97df220f49
commit 4930992118
5 changed files with 152 additions and 22 deletions

View File

@@ -275,6 +275,9 @@ VP_BASE_C_SRCS += arch/x86/guest/ucode.c
ifeq ($(CONFIG_HYPERV_ENABLED),y)
VP_BASE_C_SRCS += arch/x86/guest/hyperv.c
endif
ifeq ($(CONFIG_NVMX_ENABLED),y)
VP_BASE_C_SRCS += arch/x86/guest/nested.c
endif
VP_BASE_C_SRCS += boot/guest/vboot_info.c
VP_BASE_C_SRCS += common/hv_main.c
VP_BASE_C_SRCS += common/vm_load.c