Compare commits

..

No commits in common. "lowlatency-develop" and "master" have entirely different histories.

17 changed files with 59 additions and 115 deletions

9
.gitmodules vendored
View File

@ -1,7 +1,6 @@
[submodule "submodules/ubuntu-kernel"]
path = submodules/ubuntu-kernel
url = https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/jammy/
branch = lowlatency-hwe-6.8-next
[submodule "submodules/zfsonlinux"]
path = submodules/zfsonlinux
url = https://git.proxmox.com/git/zfsonlinux.git
url = ../zfsonlinux
[submodule "submodules/ubuntu-kernel"]
path = submodules/ubuntu-kernel
url = ../mirror_ubuntu-kernels

View File

@ -1,6 +1,6 @@
include /usr/share/dpkg/pkg-info.mk
# also bump qoup-kernel-meta if the default MAJ.MIN version changes!
# also bump proxmox-kernel-meta if the default MAJ.MIN version changes!
KERNEL_MAJ=6
KERNEL_MIN=8
KERNEL_PATCHLEVEL=8
@ -11,10 +11,10 @@ KREL=2
KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
EXTRAVERSION=-$(KREL)-qoup
EXTRAVERSION=-$(KREL)-pve
KVNAME=$(KERNEL_VER)$(EXTRAVERSION)
PACKAGE=qoup-kernel-$(KVNAME)
HDRPACKAGE=qoup-headers-$(KVNAME)
PACKAGE=proxmox-kernel-$(KVNAME)
HDRPACKAGE=proxmox-headers-$(KVNAME)
ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
@ -27,7 +27,7 @@ endif
SKIPABI=0
BUILD_DIR=qoup-kernel-$(KERNEL_VER)
BUILD_DIR=proxmox-kernel-$(KERNEL_VER)
KERNEL_SRC=ubuntu-kernel
KERNEL_SRC_SUBMODULE=submodules/$(KERNEL_SRC)
@ -42,13 +42,13 @@ MODULE_DIRS=$(ZFSDIR)
# exported to debian/rules via debian/rules.d/dirs.mk
DIRS=KERNEL_SRC ZFSDIR MODULES
DSC=qoup-kernel-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(KREL).dsc
DSC=proxmox-kernel-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(KREL).dsc
DST_DEB=$(PACKAGE)_$(KERNEL_VER)-$(KREL)_$(ARCH).deb
SIGNED_TEMPLATE_DEB=$(PACKAGE)-signed-template_$(KERNEL_VER)-$(KREL)_$(ARCH).deb
META_DEB=qoup-kernel-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(KREL)_all.deb
META_DEB=proxmox-kernel-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(KREL)_all.deb
HDR_DEB=$(HDRPACKAGE)_$(KERNEL_VER)-$(KREL)_$(ARCH).deb
META_HDR_DEB=qoup-headers-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(KREL)_all.deb
USR_HDR_DEB=qoup-kernel-libc-dev_$(KERNEL_VER)-$(KREL)_$(ARCH).deb
META_HDR_DEB=proxmox-headers-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(KREL)_all.deb
USR_HDR_DEB=proxmox-kernel-libc-dev_$(KERNEL_VER)-$(KREL)_$(ARCH).deb
LINUX_TOOLS_DEB=linux-tools-$(KERNEL_MAJMIN)_$(KERNEL_VER)-$(KREL)_$(ARCH).deb
LINUX_TOOLS_DBG_DEB=linux-tools-$(KERNEL_MAJMIN)-dbgsym_$(KERNEL_VER)-$(KREL)_$(ARCH).deb
@ -167,5 +167,5 @@ abi-tmp-$(KVNAME):
.PHONY: clean
clean:
rm -rf *~ qoup-kernel-[0-9]*/ *.prepared $(KERNEL_CFG_ORG)
rm -f *.deb *.dsc *.changes *.buildinfo *.build qoup-kernel*.tar.*
rm -rf *~ proxmox-kernel-[0-9]*/ *.prepared $(KERNEL_CFG_ORG)
rm -f *.deb *.dsc *.changes *.buildinfo *.build proxmox-kernel*.tar.*

28
debian/control.in vendored
View File

@ -1,7 +1,7 @@
Source: qoup-kernel-@KVMAJMIN@
Source: proxmox-kernel-@KVMAJMIN@
Section: devel
Priority: optional
Maintainer: Proxmox Support Team <support@qoup.ru>
Maintainer: Proxmox Support Team <support@proxmox.com>
Build-Depends: asciidoc-base,
automake,
bc,
@ -32,7 +32,7 @@ Build-Depends: asciidoc-base,
xmlto,
zlib1g-dev,
zstd,
Build-Conflicts: qoup-headers-@KVNAME@,
Build-Conflicts: proxmox-headers-@KVNAME@,
Standards-Version: 4.6.2
Vcs-Git: git://git.proxmox.com/git/pve-kernel
Vcs-Browser: https://git.proxmox.com/?p=pve-kernel.git
@ -46,7 +46,7 @@ Description: Linux kernel version specific tools for version @KVMAJMIN@
This package provides the architecture dependent parts for kernel
version locked tools (such as perf and x86_energy_perf_policy)
Package: qoup-headers-@KVNAME@
Package: proxmox-headers-@KVNAME@
Section: devel
Priority: optional
Architecture: any
@ -55,7 +55,7 @@ Depends: ${misc:Depends},
Description: Proxmox Kernel Headers
This package contains the linux kernel headers
Package: qoup-kernel-@KVNAME@
Package: proxmox-kernel-@KVNAME@
Section: admin
Priority: optional
Architecture: any
@ -66,28 +66,28 @@ Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub-efi-arm64,
Description: Proxmox Kernel Image
This package contains the linux kernel and initial ramdisk used for booting
Package: qoup-kernel-@KVNAME@-dbgsym
Package: proxmox-kernel-@KVNAME@-dbgsym
Architecture: any
Provides: linux-debug, pve-kernel-@KVNAME@-dbgsym
Section: devel
Priority: optional
Build-Profiles: <pkg.qoup-kernel.debug>
Build-Profiles: <pkg.proxmox-kernel.debug>
Depends: ${misc:Depends},
Description: Proxmox Kernel debug image
This package provides the kernel debug image for version @KVNAME@. The debug
kernel image contained in this package is NOT meant to boot from - it is
uncompressed, and unstripped, and suitable for use with crash/kdump-tools/..
to analyze kernel crashes. This package also contains the qoup-kernel modules
to analyze kernel crashes. This package also contains the proxmox-kernel modules
in their unstripped version.
Package: qoup-kernel-@KVNAME@-signed-template
Package: proxmox-kernel-@KVNAME@-signed-template
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, make | build-essential | dpkg-dev
Description: Template for signed kernel package
This package is used to control code signing by the Proxmox signing
service.
Package: qoup-kernel-libc-dev
Package: proxmox-kernel-libc-dev
Section: devel
Priority: optional
Architecture: any
@ -100,25 +100,25 @@ Description: Linux support headers for userspace development
This package provides userspaces headers from the Linux kernel. These headers
are used by the installed headers for GNU libc and other system libraries.
Package: qoup-headers-@KVMAJMIN@
Package: proxmox-headers-@KVMAJMIN@
Architecture: all
Section: admin
Provides: linux-headers-amd64, linux-headers-generic, pve-headers-@KVMAJMIN@
Replaces: pve-headers-@KVMAJMIN@
Priority: optional
Depends: qoup-headers-@KVNAME@, ${misc:Depends},
Depends: proxmox-headers-@KVNAME@, ${misc:Depends},
Description: Latest Proxmox Kernel Headers
This is a metapackage which will install the kernel headers
for the latest available proxmox kernel from the @KVMAJMIN@
series.
Package: qoup-kernel-@KVMAJMIN@
Package: proxmox-kernel-@KVMAJMIN@
Architecture: all
Section: admin
Provides: linux-image-amd64, linux-image-generic, wireguard-modules (=1.0.0), pve-kernel-@KVMAJMIN@
Replaces: pve-kernel-@KVMAJMIN@
Priority: optional
Depends: pve-firmware, qoup-kernel-@KVNAME@-signed | qoup-kernel-@KVNAME@, ${misc:Depends},
Depends: pve-firmware, proxmox-kernel-@KVNAME@-signed | proxmox-kernel-@KVNAME@, ${misc:Depends},
Description: Latest Proxmox Kernel Image
This is a metapackage which will install the latest available
proxmox kernel from the @KVMAJMIN@ series.

38
debian/rules vendored
View File

@ -16,12 +16,12 @@ MAKEFLAGS += $(subst parallel=,-j,$(filter parallel=%,${DEB_BUILD_OPTIONS}))
CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
CHANGELOG_DATE_UTC_ISO := $(shell date -u -d '$(CHANGELOG_DATE)' +%Y-%m-%dT%H:%MZ)
PMX_KERNEL_PKG=qoup-kernel-$(KVNAME)
PMX_KERNEL_SERIES_PKG=qoup-kernel-$(KERNEL_MAJMIN)
PMX_DEBUG_KERNEL_PKG=qoup-kernel-$(KVNAME)-dbgsym
PMX_HEADER_PKG=qoup-headers-$(KVNAME)
PMX_USR_HEADER_PKG=qoup-kernel-libc-dev
PMX_KERNEL_SIGNING_TEMPLATE_PKG=qoup-kernel-${KVNAME}-signed-template
PMX_KERNEL_PKG=proxmox-kernel-$(KVNAME)
PMX_KERNEL_SERIES_PKG=proxmox-kernel-$(KERNEL_MAJMIN)
PMX_DEBUG_KERNEL_PKG=proxmox-kernel-$(KVNAME)-dbgsym
PMX_HEADER_PKG=proxmox-headers-$(KVNAME)
PMX_USR_HEADER_PKG=proxmox-kernel-libc-dev
PMX_KERNEL_SIGNING_TEMPLATE_PKG=proxmox-kernel-${KVNAME}-signed-template
PMX_KERNEL_SIGNED_VERSION := $(shell echo ${DEB_VERSION} | sed -e 's/-/+/')
LINUX_TOOLS_PKG=linux-tools-$(KERNEL_MAJMIN)
KERNEL_SRC_COPY=$(KERNEL_SRC)_tmp
@ -106,12 +106,12 @@ PMX_CONFIG_OPTS= \
-d UBSAN_BOUNDS \
debian/control: $(wildcard debian/*.in)
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/qoup-kernel.prerm.in > debian/$(PMX_KERNEL_PKG).prerm
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/qoup-kernel.postrm.in > debian/$(PMX_KERNEL_PKG).postrm
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/qoup-kernel.postinst.in > debian/$(PMX_KERNEL_PKG).postinst
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/qoup-headers.postinst.in > debian/$(PMX_HEADER_PKG).postinst
sed -e 's/@@KVMAJMIN@@/$(KERNEL_MAJMIN)/g' -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/qoup-kernel-meta.postrm.in > debian/$(PMX_KERNEL_SERIES_PKG).postrm
sed -e 's/@@KVMAJMIN@@/$(KERNEL_MAJMIN)/g' -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/qoup-kernel-meta.postinst.in > debian/$(PMX_KERNEL_SERIES_PKG).postinst
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/proxmox-kernel.prerm.in > debian/$(PMX_KERNEL_PKG).prerm
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/proxmox-kernel.postrm.in > debian/$(PMX_KERNEL_PKG).postrm
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/proxmox-kernel.postinst.in > debian/$(PMX_KERNEL_PKG).postinst
sed -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/proxmox-headers.postinst.in > debian/$(PMX_HEADER_PKG).postinst
sed -e 's/@@KVMAJMIN@@/$(KERNEL_MAJMIN)/g' -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/proxmox-kernel-meta.postrm.in > debian/$(PMX_KERNEL_SERIES_PKG).postrm
sed -e 's/@@KVMAJMIN@@/$(KERNEL_MAJMIN)/g' -e 's/@@KVNAME@@/$(KVNAME)/g' < debian/proxmox-kernel-meta.postinst.in > debian/$(PMX_KERNEL_SERIES_PKG).postinst
chmod +x debian/$(PMX_KERNEL_PKG).prerm
chmod +x debian/$(PMX_KERNEL_PKG).postrm
chmod +x debian/$(PMX_KERNEL_PKG).postinst
@ -121,13 +121,13 @@ debian/control: $(wildcard debian/*.in)
sed -e 's/@KVNAME@/$(KVNAME)/g' -e 's/@KVMAJMIN@/$(KERNEL_MAJMIN)/g' < debian/control.in > debian/control
# signing-template
sed -e '1 s/qoup-kernel/qoup-kernel-signed/' -e '1 s/${DEB_VERSION}/${PMX_KERNEL_SIGNED_VERSION}/' < debian/changelog > debian/signing-template/changelog
sed -e '1 s/proxmox-kernel/proxmox-kernel-signed/' -e '1 s/${DEB_VERSION}/${PMX_KERNEL_SIGNED_VERSION}/' < debian/changelog > debian/signing-template/changelog
sed -e 's/@KVNAME@/${KVNAME}/g' -e 's/@KVMAJMIN@/$(KERNEL_MAJMIN)/g' -e 's/@UNSIGNED_VERSION@/${DEB_VERSION}/g' < debian/signing-template/control.in > debian/signing-template/control
sed -e 's/@KVNAME@/${KVNAME}/g' < debian/signing-template/files.json.in > debian/signing-template/files.json
sed -e 's/@KVNAME@/${KVNAME}/g' -e 's/@PKG_VERSION@/${DEB_VERSION}/' < debian/signing-template/rules.in > debian/signing-template/rules
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/qoup-kernel.prerm.in > debian/signing-template/prerm
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/qoup-kernel.postrm.in > debian/signing-template/postrm
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/qoup-kernel.postinst.in > debian/signing-template/postinst
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/proxmox-kernel.prerm.in > debian/signing-template/prerm
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/proxmox-kernel.postrm.in > debian/signing-template/postrm
sed -e 's/@@KVNAME@@/${KVNAME}/g' < debian/proxmox-kernel.postinst.in > debian/signing-template/postinst
rm debian/signing-template/*.in
cp debian/SOURCE debian/signing-template/
@ -177,10 +177,10 @@ binary: install
# remove firmware
rm -rf debian/$(PMX_KERNEL_PKG)/lib/firmware
ifeq ($(filter pkg.qoup-kernel.debug,$(DEB_BUILD_PROFILES)),)
echo "'pkg.qoup-kernel.debug' build profile disabled, skipping -dbgsym creation"
ifeq ($(filter pkg.proxmox-kernel.debug,$(DEB_BUILD_PROFILES)),)
echo "'pkg.proxmox-kernel.debug' build profile disabled, skipping -dbgsym creation"
else
echo "'pkg.qoup-kernel.debug' build profile enabled, creating -dbgsym contents"
echo "'pkg.proxmox-kernel.debug' build profile enabled, creating -dbgsym contents"
mkdir -p debian/$(PMX_DEBUG_KERNEL_PKG)/usr/lib/debug/lib/modules/$(KVNAME)
mkdir debian/$(PMX_DEBUG_KERNEL_PKG)/usr/lib/debug/boot
install -m 644 $(KERNEL_SRC)/vmlinux debian/$(PMX_DEBUG_KERNEL_PKG)/usr/lib/debug/boot/vmlinux-$(KVNAME)

View File

@ -1,24 +1,24 @@
Source: qoup-kernel-signed-@KVMAJMIN@
Source: proxmox-kernel-signed-@KVMAJMIN@
Section: kernel
Priority: optional
Maintainer: Proxmox Support Team <support@qoup.ru>
Maintainer: Proxmox Support Team <support@proxmox.com>
Standards-Version: 4.2.0
Build-Depends: debhelper-compat (= 12), dh-exec, python3:any, rsync, sbsigntool, qoup-kernel-@KVNAME@ (= @UNSIGNED_VERSION@)
Build-Depends: debhelper-compat (= 12), dh-exec, python3:any, rsync, sbsigntool, proxmox-kernel-@KVNAME@ (= @UNSIGNED_VERSION@)
Rules-Requires-Root: no
Vcs-Git: git://git.proxmox.com/git/pve-kernel
Vcs-Browser: https://git.proxmox.com/?p=pve-kernel.git
Package: qoup-kernel-@KVNAME@-signed
Package: proxmox-kernel-@KVNAME@-signed
Section: admin
Priority: optional
Architecture: any
Provides: linux-image-@KVNAME@-amd64, qoup-kernel-@KVNAME@
Provides: linux-image-@KVNAME@-amd64, proxmox-kernel-@KVNAME@
Depends: ${unsigned:Depends}, ${misc:Depends}
Recommends: ${unsigned:Recommends}
Suggests: ${unsigned:Suggests}
Breaks: ${unsigned:Breaks}
Conflicts: qoup-kernel-@KVNAME@
Replaces: qoup-kernel-@KVNAME@
Conflicts: proxmox-kernel-@KVNAME@
Replaces: proxmox-kernel-@KVNAME@
Description: ${unsigned:DescriptionShort} (signed)
${unsigned:DescriptionLong}
.

View File

@ -1,6 +1,6 @@
{
"packages": {
"qoup-kernel-@KVNAME@": {
"proxmox-kernel-@KVNAME@": {
"trusted_certs": [],
"files": [
{

View File

@ -7,7 +7,7 @@ export DH_OPTIONS
include /usr/share/dpkg/architecture.mk
KERNEL_VERSION=@KVNAME@
IMAGE_PACKAGE_NAME=qoup-kernel-$(KERNEL_VERSION)
IMAGE_PACKAGE_NAME=proxmox-kernel-$(KERNEL_VERSION)
PACKAGE_NAME=$(IMAGE_PACKAGE_NAME)-signed
PACKAGE_VERSION=@PKG_VERSION@
PACKAGE_DIR=debian/$(PACKAGE_NAME)

View File

@ -1,2 +1,2 @@
debian-control-has-dbgsym-package (in section for qoup-kernel-*-pve-dbgsym) Package [debian/control:*]
debian-control-has-dbgsym-package (in section for proxmox-kernel-*-pve-dbgsym) Package [debian/control:*]
license-problem-gfdl-invariants invariant part is: with the :ref:`invariant sections <fdl-invariant>` being list their titles, with the :ref:`front-cover texts <fdl-cover-texts>` being list, and with the :ref:`back-cover texts <fdl-cover-texts>` being list [ubuntu-kernel/Documentation/userspace-api/media/fdl-appendix.rst]

View File

@ -1,55 +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 =
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

@ -1 +1 @@
Subproject commit 8b97f8a67b8a1579d3bfe3ff1e933185941a6004
Subproject commit ffe6f6578643a9ae802c3eb5a64096f51a0e0524