diff mbox series

[kvm-unit-tests,34/39] nVMX: Fix name of macro defining EPT execute only capability

Message ID 20211125012857.508243-35-seanjc@google.com (mailing list archive)
State New, archived
Headers show
Series x86/access: nVMX: Big overhaul | expand

Commit Message

Sean Christopherson Nov. 25, 2021, 1:28 a.m. UTC
Rename EPT_CAP_WT to EPT_CAP_EXEC_ONLY.  In x86, "WT" generally refers to
write-through memtype, and is especially confusing considering that EPT
capabilities also report UC and WB memtypes.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 x86/vmx.c | 2 +-
 x86/vmx.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Paolo Bonzini Nov. 26, 2021, 6:31 p.m. UTC | #1
On 11/25/21 02:28, Sean Christopherson wrote:
> Rename EPT_CAP_WT to EPT_CAP_EXEC_ONLY.  In x86, "WT" generally refers to
> write-through memtype, and is especially confusing considering that EPT
> capabilities also report UC and WB memtypes.
> 
> Signed-off-by: Sean Christopherson<seanjc@google.com>

Yeah, I am not sure why it was "EPT_CAP_WT".  That one should have been 
for bit 12 (if it was useful at all).

Paolo
diff mbox series

Patch

diff --git a/x86/vmx.c b/x86/vmx.c
index e499704..6dc9a55 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1606,7 +1606,7 @@  static void test_vmx_caps(void)
 	       "MSR_IA32_VMX_VMCS_ENUM");
 
 	fixed0 = -1ull;
-	fixed0 &= ~(EPT_CAP_WT |
+	fixed0 &= ~(EPT_CAP_EXEC_ONLY |
 		    EPT_CAP_PWL4 |
 		    EPT_CAP_PWL5 |
 		    EPT_CAP_UC |
diff --git a/x86/vmx.h b/x86/vmx.h
index e6126e4..d3e95f5 100644
--- a/x86/vmx.h
+++ b/x86/vmx.h
@@ -697,7 +697,7 @@  enum vm_entry_failure_code {
 #define EPT_IGNORE_PAT		(1ul << 6)
 #define EPT_SUPPRESS_VE		(1ull << 63)
 
-#define EPT_CAP_WT		1ull
+#define EPT_CAP_EXEC_ONLY	(1ull << 0)
 #define EPT_CAP_PWL4		(1ull << 6)
 #define EPT_CAP_PWL5		(1ull << 7)
 #define EPT_CAP_UC		(1ull << 8)
@@ -807,7 +807,7 @@  static inline bool ept_huge_pages_supported(int level)
 
 static inline bool ept_execute_only_supported(void)
 {
-	return ept_vpid.val & EPT_CAP_WT;
+	return ept_vpid.val & EPT_CAP_EXEC_ONLY;
 }
 
 static inline bool ept_ad_bits_supported(void)