From 0b2b9d94cbf803fc55f96c8be9b0cf34f7bc1478 Mon Sep 17 00:00:00 2001 From: Gregory Lirent Date: Tue, 2 Jul 2024 18:10:50 +0300 Subject: [PATCH] Update rdtsc spoof --- patches/kernel/9999-rdtsc-spoof-hook-0.patch | 15 --------------- ...f-hook-1.patch => 9999-rdtsc-spoof-hook.patch} | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) delete mode 100644 patches/kernel/9999-rdtsc-spoof-hook-0.patch rename patches/kernel/{9999-rdtsc-spoof-hook-1.patch => 9999-rdtsc-spoof-hook.patch} (66%) diff --git a/patches/kernel/9999-rdtsc-spoof-hook-0.patch b/patches/kernel/9999-rdtsc-spoof-hook-0.patch deleted file mode 100644 index a901b7f..0000000 --- a/patches/kernel/9999-rdtsc-spoof-hook-0.patch +++ /dev/null @@ -1,15 +0,0 @@ -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 +6137,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 = - \ No newline at end of file diff --git a/patches/kernel/9999-rdtsc-spoof-hook-1.patch b/patches/kernel/9999-rdtsc-spoof-hook.patch similarity index 66% rename from patches/kernel/9999-rdtsc-spoof-hook-1.patch rename to patches/kernel/9999-rdtsc-spoof-hook.patch index ead5885..227c422 100644 --- a/patches/kernel/9999-rdtsc-spoof-hook-1.patch +++ b/patches/kernel/9999-rdtsc-spoof-hook.patch @@ -1,3 +1,18 @@ +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 +6137,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 = + 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