asamy/ksm

MSR_IA32_FEATURE_CONTROL lock bit is set in kernel version 5.x

Opened this issue · 0 comments

MSR_IA32_FEATURE_CONTROL.lock[0bit] = 1 is set in kernel version 5.x by default.

which means no modification to MSRs is allowed until the system reboot.

the code in ksm.c is invalid anymore.

// ksm.c    int __ksm_init_cpu(struct ksm *k)

feat_ctl = __readmsr(MSR_IA32_FEATURE_CONTROL);
	if ((feat_ctl & required_feat_bits) != required_feat_bits) {