[CI] <x86/AMD64> Introduce an option to compile LKRG without verifying MSRs on each (v)CPU core. It might be useful for the host machines which manages VMs (root-partition). This compilation option is DISABLED by default.

This commit is contained in:
Adam_pi3 2019-12-01 20:59:25 -05:00
parent bfcc8de9b5
commit 161a3c11e2
2 changed files with 19 additions and 7 deletions

View file

@ -21,13 +21,24 @@
u64 p_read_msr(/*int p_cpu, */u32 p_arg);
#define P_MSR_READ_COUNT(x,y,z) \
do { \
char p_tmp = x-1; \
do { \
y = p_read_msr(z); \
} while(!y && p_tmp--); \
} while(0)
#if defined(P_LKRG_CI_X86_NO_MSR)
#define P_MSR_READ_COUNT(x,y,z) \
do { \
y = -1; \
} while(0)
#else
#define P_MSR_READ_COUNT(x,y,z) \
do { \
char p_tmp = x-1; \
do { \
y = p_read_msr(z); \
} while(!y && p_tmp--); \
} while(0)
#endif
#ifdef CONFIG_X86_64
#define P_MSR_ASM_RET(val, low, high) (((u64)(high) << 32) | (low))

View file

@ -19,6 +19,7 @@
#define P_LKRG_MAIN_H
#define P_LKRG_UNHIDE
//#define P_LKRG_CI_X86_NO_MSR
//#define P_LKRG_PCFI_NO_STACKWALK
#include <linux/kernel.h>