update rdtsc-spoof-hook

This commit is contained in:
Gregory Lirent 2024-07-02 00:11:19 +03:00
parent 5a93557c0c
commit fe2cfc7ffd
Signed by: lirent
GPG Key ID: F616BE337EFFEE77

View File

@ -1,6 +1,17 @@
diff -Naur --no-dereference a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
--- a/arch/x86/kvm/vmx/vmx.c 2024-07-01 21:03:34.000000000 +0300
+++ b/arch/x86/kvm/vmx/vmx.c 2024-07-01 20:24:05.000000000 +0300
@@ -6137,6 +6167,10 @@
[EXIT_REASON_ENCLS] = handle_encls,
[EXIT_REASON_BUS_LOCK] = handle_bus_lock_vmexit,
[EXIT_REASON_NOTIFY] = handle_notify,
+ [EXIT_REASON_RDTSC] = handle_rdtsc,
+ [EXIT_REASON_RDTSCP] = handle_rdtscp,
+ [EXIT_REASON_UMWAIT] = handle_umwait,
+ [EXIT_REASON_TPAUSE] = handle_tpause,
};
static const int kvm_vmx_max_exit_handlers =
@@ -6079,6 +6079,36 @@
return 1;
}
@ -38,14 +49,3 @@ diff -Naur --no-dereference a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
/*
* The exit handlers return 1 if the exit was handled fully and guest execution
* may resume. Otherwise they set the kvm_run parameter to indicate what needs
@@ -6137,6 +6167,10 @@
[EXIT_REASON_ENCLS] = handle_encls,
[EXIT_REASON_BUS_LOCK] = handle_bus_lock_vmexit,
[EXIT_REASON_NOTIFY] = handle_notify,
+ [EXIT_REASON_RDTSC] = handle_rdtsc,
+ [EXIT_REASON_RDTSCP] = handle_rdtscp,
+ [EXIT_REASON_UMWAIT] = handle_umwait,
+ [EXIT_REASON_TPAUSE] = handle_tpause,
};
static const int kvm_vmx_max_exit_handlers =