From bed82dd3f81f7a30e14aefe60d2258d9f4b541d7 Mon Sep 17 00:00:00 2001 From: Jason Chen CJ Date: Mon, 17 Dec 2018 14:05:00 +0800 Subject: [PATCH] cleanup vmcs source and header files remove no need included header files and macro definitions Changes to be committed: modified: arch/x86/vmcs.c modified: include/arch/x86/vmcs.h Tracked-On: #1842 Signed-off-by: Jason Chen CJ --- hypervisor/arch/x86/vmcs.c | 11 ----------- hypervisor/include/arch/x86/vmcs.h | 4 ++-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/hypervisor/arch/x86/vmcs.c b/hypervisor/arch/x86/vmcs.c index a8a2f625b..5f4b9270b 100644 --- a/hypervisor/arch/x86/vmcs.c +++ b/hypervisor/arch/x86/vmcs.c @@ -7,20 +7,9 @@ */ #include -#include #include -#ifdef CONFIG_EFI_STUB -extern struct efi_context* efi_ctx; -#endif -#define REAL_MODE_BSP_INIT_CODE_SEL (0xf000U) -#define REAL_MODE_DATA_SEG_AR (0x0093U) -#define REAL_MODE_CODE_SEG_AR (0x009fU) -#define PROTECTED_MODE_DATA_SEG_AR (0xc093U) -#define PROTECTED_MODE_CODE_SEG_AR (0xc09bU) #define DR7_INIT_VALUE (0x400UL) -#define LDTR_AR (0x0082U) /* LDT, type must be 2, refer to SDM Vol3 26.3.1.2 */ -#define TR_AR (0x008bU) /* TSS (busy), refer to SDM Vol3 26.3.1.2 */ static uint64_t cr0_host_mask; static uint64_t cr0_always_on_mask; diff --git a/hypervisor/include/arch/x86/vmcs.h b/hypervisor/include/arch/x86/vmcs.h index f1ffe2b40..c0c7eb689 100644 --- a/hypervisor/include/arch/x86/vmcs.h +++ b/hypervisor/include/arch/x86/vmcs.h @@ -10,10 +10,10 @@ #define VM_SUCCESS 0 #define VM_FAIL -1 -#define VMX_VMENTRY_FAIL 0x80000000U - #ifndef ASSEMBLER +#define VMX_VMENTRY_FAIL 0x80000000U + static inline uint32_t vmx_eoi_exit(uint32_t vector) { return (VMX_EOI_EXIT0_FULL + ((vector >> 6U) * 2U));