11 Commits

Author SHA1 Message Date
lirent 0d3d8fdff3 Merge branch 'update-version' into develop 2024-07-02 16:34:58 +03:00
lirent 9bc0e99d58 update ABI file for 6.8.8-1002-pve 2024-07-02 16:34:39 +03:00
lirent 97b2cf12ab v6.8.8-1002 2024-07-02 16:22:35 +03:00
lirent 1ad8b7f56f Update Makefile 2024-07-02 13:45:02 +03:00
lirent 35541e70bd Merge branch 'rdtsc-spoof' into develop 2024-07-02 11:53:58 +03:00
lirent aed880954c Update rdtsc spoof 2024-07-02 11:52:53 +03:00
lirent 2fc0c38547 Merge branch 'rdtsc-spoof' into develop 2024-07-02 09:33:16 +03:00
lirent 97c120d05c Add rdtsc spoof hook 2024-07-02 09:32:49 +03:00
lirent ccb1c46442 Update submodules 2024-07-02 09:27:56 +03:00
lirent 08796d96fc Update submodules 2024-07-02 09:19:41 +03:00
lirent 642e6073ae Update Makefile 2024-07-02 08:51:48 +03:00
6 changed files with 62 additions and 6 deletions
+5 -4
View File
@@ -1,6 +1,7 @@
[submodule "submodules/zfsonlinux"]
path = submodules/zfsonlinux
url = ../zfsonlinux
[submodule "submodules/ubuntu-kernel"]
path = submodules/ubuntu-kernel
url = ../mirror_ubuntu-kernels
url = https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/
branch = hwe-6.8-next
[submodule "submodules/zfsonlinux"]
path = submodules/zfsonlinux
url = https://git.proxmox.com/git/zfsonlinux.git
+1 -1
View File
@@ -6,7 +6,7 @@ KERNEL_MIN=8
KERNEL_PATCHLEVEL=8
# increment KREL for every published package release!
# rebuild packages with new KREL and run 'make abiupdate'
KREL=2
KREL=1002
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
@@ -0,0 +1,15 @@
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 =
@@ -0,0 +1,40 @@
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
@@ -6079,6 +6079,36 @@
return 1;
}
+static int handle_rdtsc(struct kvm_vcpu *vcpu)
+{
+ u64 _rdtsc = rdtsc();
+ printk_once("[HookEntry] hook entry function handle_rdtsc is working, return the rdtsc() if no hook , you can hook here!\n");
+ vcpu->arch.regs[VCPU_REGS_RAX] = _rdtsc & -1u;
+ vcpu->arch.regs[VCPU_REGS_RDX] = (_rdtsc >> 32) & -1u;
+ return kvm_skip_emulated_instruction(vcpu);
+}
+
+static int handle_rdtscp(struct kvm_vcpu *vcpu)
+{
+ u64 _rdtsc = rdtsc();
+ printk_once("[HookEntry] hook entry function handle_rdtscp is working, return the rdtsc() if no hook , you can hook here!\n");
+ vcpu->arch.regs[VCPU_REGS_RAX] = _rdtsc & -1u;
+ vcpu->arch.regs[VCPU_REGS_RDX] = (_rdtsc >> 32) & -1u;
+ return kvm_skip_emulated_instruction(vcpu);
+}
+
+static int handle_umwait(struct kvm_vcpu *vcpu)
+{
+ kvm_skip_emulated_instruction(vcpu);
+ return 1;
+}
+
+static int handle_tpause(struct kvm_vcpu *vcpu)
+{
+ kvm_skip_emulated_instruction(vcpu);
+ return 1;
+}
+
/*
* 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