Skip to content

Commit

Permalink
fix invpcid flag for newer kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
misc0110 committed Jun 14, 2024
1 parent b6338d4 commit 75d3c7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/pteditor.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ _invalidate_tlb(void *addr) {
unsigned long cr4;

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 98)
#ifndef X86_FEATURE_INVPCID_SINGLE
#define X86_FEATURE_INVPCID_SINGLE X86_FEATURE_INVPCID
#endif
#if defined(X86_FEATURE_INVPCID_SINGLE) && defined(INVPCID_TYPE_INDIV_ADDR)
if (cpu_feature_enabled(X86_FEATURE_INVPCID_SINGLE)) {
for(pcid = 0; pcid < 4096; pcid++) {
Expand Down

0 comments on commit 75d3c7f

Please sign in to comment.