enable mtc

This commit is contained in:
David Venhoff 2025-09-03 14:11:31 +02:00
parent a1702d9ab7
commit 44ceaf2cf8
2 changed files with 7 additions and 1 deletions

View File

@ -865,7 +865,7 @@ static inline void vmx_pt_setup_msrs(struct vcpu_vmx_pt *vmx_pt){
int i;
//vmx_pt->ia32_rtit_ctrl_msr = 0ULL;
WRITE_ONCE(vmx_pt->ia32_rtit_ctrl_msr, (!TRACE_EN) | CTL_OS | CTL_USER | TO_PA | PTWRITE_EN | BRANCH_EN | DIS_RETC | PSB_MASK | CYC_EN | TSC_EN);
WRITE_ONCE(vmx_pt->ia32_rtit_ctrl_msr, (!TRACE_EN) | CTL_OS | CTL_USER | TO_PA | PTWRITE_EN | BRANCH_EN | DIS_RETC | PSB_MASK | CYC_EN | TSC_EN | MTC_EN);
//vmx_pt->ia32_rtit_ctrl_msr = (!TRACE_EN) | CTL_OS | CTL_USER | TO_PA | BRANCH_EN | DIS_RETC | PSB_MASK;
for (i = 0; i < 4; i++){
@ -1136,6 +1136,11 @@ static int vmx_pt_check_support(void){
return -EIO;
}
if (!(b & BIT(0))) {
PRINT_ERROR("NO MTC SUPPORT");
return -EIO;
}
cpuid_count(0x14, 1, &a, &b, &c, &d);
//printk("Supported IP Filter Regions: %lx\n", a&0x7);
supported_addrn = a&0x7;

View File

@ -4,5 +4,6 @@ cp /lib/modules/`uname -r`/build/scripts/module.lds scripts/ &&
cp /lib/modules/`uname -r`/build/Module.symvers . &&
cp /lib/modules/`uname -r`/build/include/config/kernel.release include/config/kernel.release &&
cp /lib/modules/`uname -r`/build/include/generated/utsrelease.h include/generated/utsrelease.h &&
#make KCFLAGS=-DDEBUG M=arch/x86/kvm/ -j KBUILD_MODPOST_WARN=1 &&
make M=arch/x86/kvm/ -j KBUILD_MODPOST_WARN=1 &&
echo "[!] kvm-nyx successfully compiled"