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 <jason.cj.chen@intel.com>
This commit is contained in:
Jason Chen CJ 2018-12-17 14:05:00 +08:00 committed by wenlingz
parent 731c4836dd
commit bed82dd3f8
2 changed files with 2 additions and 13 deletions

View File

@ -7,20 +7,9 @@
*/ */
#include <hypervisor.h> #include <hypervisor.h>
#include <vm0_boot.h>
#include <cpu.h> #include <cpu.h>
#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 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_host_mask;
static uint64_t cr0_always_on_mask; static uint64_t cr0_always_on_mask;

View File

@ -10,10 +10,10 @@
#define VM_SUCCESS 0 #define VM_SUCCESS 0
#define VM_FAIL -1 #define VM_FAIL -1
#define VMX_VMENTRY_FAIL 0x80000000U
#ifndef ASSEMBLER #ifndef ASSEMBLER
#define VMX_VMENTRY_FAIL 0x80000000U
static inline uint32_t vmx_eoi_exit(uint32_t vector) static inline uint32_t vmx_eoi_exit(uint32_t vector)
{ {
return (VMX_EOI_EXIT0_FULL + ((vector >> 6U) * 2U)); return (VMX_EOI_EXIT0_FULL + ((vector >> 6U) * 2U));