diff options
| -rw-r--r-- | arch/x86/include/asm/vmx.h | 3 | ||||
| -rw-r--r-- | arch/x86/kvm/vmx.c | 16 |
2 files changed, 1 insertions, 18 deletions
diff --git a/arch/x86/include/asm/vmx.h b/arch/x86/include/asm/vmx.h index 36ec21c36d68..c2d56b34830d 100644 --- a/arch/x86/include/asm/vmx.h +++ b/arch/x86/include/asm/vmx.h | |||
| @@ -445,8 +445,7 @@ enum vmcs_field { | |||
| 445 | #define VMX_EPTP_WB_BIT (1ull << 14) | 445 | #define VMX_EPTP_WB_BIT (1ull << 14) |
| 446 | #define VMX_EPT_2MB_PAGE_BIT (1ull << 16) | 446 | #define VMX_EPT_2MB_PAGE_BIT (1ull << 16) |
| 447 | #define VMX_EPT_1GB_PAGE_BIT (1ull << 17) | 447 | #define VMX_EPT_1GB_PAGE_BIT (1ull << 17) |
| 448 | #define VMX_EPT_AD_BIT (1ull << 21) | 448 | #define VMX_EPT_AD_BIT (1ull << 21) |
| 449 | #define VMX_EPT_EXTENT_INDIVIDUAL_BIT (1ull << 24) | ||
| 450 | #define VMX_EPT_EXTENT_CONTEXT_BIT (1ull << 25) | 449 | #define VMX_EPT_EXTENT_CONTEXT_BIT (1ull << 25) |
| 451 | #define VMX_EPT_EXTENT_GLOBAL_BIT (1ull << 26) | 450 | #define VMX_EPT_EXTENT_GLOBAL_BIT (1ull << 26) |
| 452 | 451 | ||
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d2248b3dbb61..32485d8d05d4 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
| @@ -802,11 +802,6 @@ static inline bool cpu_has_vmx_ept_ad_bits(void) | |||
| 802 | return vmx_capability.ept & VMX_EPT_AD_BIT; | 802 | return vmx_capability.ept & VMX_EPT_AD_BIT; |
| 803 | } | 803 | } |
| 804 | 804 | ||
| 805 | static inline bool cpu_has_vmx_invept_individual_addr(void) | ||
| 806 | { | ||
| 807 | return vmx_capability.ept & VMX_EPT_EXTENT_INDIVIDUAL_BIT; | ||
| 808 | } | ||
| 809 | |||
| 810 | static inline bool cpu_has_vmx_invept_context(void) | 805 | static inline bool cpu_has_vmx_invept_context(void) |
| 811 | { | 806 | { |
| 812 | return vmx_capability.ept & VMX_EPT_EXTENT_CONTEXT_BIT; | 807 | return vmx_capability.ept & VMX_EPT_EXTENT_CONTEXT_BIT; |
| @@ -1062,17 +1057,6 @@ static inline void ept_sync_context(u64 eptp) | |||
| 1062 | } | 1057 | } |
| 1063 | } | 1058 | } |
| 1064 | 1059 | ||
| 1065 | static inline void ept_sync_individual_addr(u64 eptp, gpa_t gpa) | ||
| 1066 | { | ||
| 1067 | if (enable_ept) { | ||
| 1068 | if (cpu_has_vmx_invept_individual_addr()) | ||
| 1069 | __invept(VMX_EPT_EXTENT_INDIVIDUAL_ADDR, | ||
| 1070 | eptp, gpa); | ||
| 1071 | else | ||
| 1072 | ept_sync_context(eptp); | ||
| 1073 | } | ||
| 1074 | } | ||
| 1075 | |||
| 1076 | static __always_inline unsigned long vmcs_readl(unsigned long field) | 1060 | static __always_inline unsigned long vmcs_readl(unsigned long field) |
| 1077 | { | 1061 | { |
| 1078 | unsigned long value; | 1062 | unsigned long value; |
