Skip to content

Commit fa6c8fc

Browse files
Nikolay Borisovsean-jc
authored andcommitted
KVM: VMX: Remove EPT_VIOLATIONS_ACC_*_BIT defines
Those defines are only used in the definition of the various EPT_VIOLATIONS_ACC_* macros which are then used to extract respective bits from vmexit error qualifications. Remove the _BIT defines and redefine the _ACC ones via BIT() macro. No functional changes. Signed-off-by: Nikolay Borisov <nik.borisov@suse.com> Link: https://lore.kernel.org/r/20250227000705.3199706-2-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent d62c02a commit fa6c8fc

File tree

1 file changed

+5
-10
lines changed
  • arch/x86/include/asm

1 file changed

+5
-10
lines changed

arch/x86/include/asm/vmx.h

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -580,18 +580,13 @@ enum vm_entry_failure_code {
580580
/*
581581
* Exit Qualifications for EPT Violations
582582
*/
583-
#define EPT_VIOLATION_ACC_READ_BIT 0
584-
#define EPT_VIOLATION_ACC_WRITE_BIT 1
585-
#define EPT_VIOLATION_ACC_INSTR_BIT 2
586583
#define EPT_VIOLATION_RWX_SHIFT 3
587-
#define EPT_VIOLATION_GVA_IS_VALID_BIT 7
588-
#define EPT_VIOLATION_GVA_TRANSLATED_BIT 8
589-
#define EPT_VIOLATION_ACC_READ (1 << EPT_VIOLATION_ACC_READ_BIT)
590-
#define EPT_VIOLATION_ACC_WRITE (1 << EPT_VIOLATION_ACC_WRITE_BIT)
591-
#define EPT_VIOLATION_ACC_INSTR (1 << EPT_VIOLATION_ACC_INSTR_BIT)
584+
#define EPT_VIOLATION_ACC_READ BIT(0)
585+
#define EPT_VIOLATION_ACC_WRITE BIT(1)
586+
#define EPT_VIOLATION_ACC_INSTR BIT(2)
592587
#define EPT_VIOLATION_RWX_MASK (VMX_EPT_RWX_MASK << EPT_VIOLATION_RWX_SHIFT)
593-
#define EPT_VIOLATION_GVA_IS_VALID (1 << EPT_VIOLATION_GVA_IS_VALID_BIT)
594-
#define EPT_VIOLATION_GVA_TRANSLATED (1 << EPT_VIOLATION_GVA_TRANSLATED_BIT)
588+
#define EPT_VIOLATION_GVA_IS_VALID BIT(7)
589+
#define EPT_VIOLATION_GVA_TRANSLATED BIT(8)
595590

596591
/*
597592
* Exit Qualifications for NOTIFY VM EXIT

0 commit comments

Comments
 (0)