Compare commits

...

1 commit

Author SHA1 Message Date
fde8e2eff8 update to vgpu 16.5 (535.161.08) 2024-12-18 13:03:24 -05:00
5 changed files with 8 additions and 113 deletions

View file

@ -1,34 +0,0 @@
From 8b5327e6fcfb68257fe432dd9f90201ae044d900 Mon Sep 17 00:00:00 2001
From: modeco80 <lily.modeco80@protonmail.ch>
Date: Sun, 29 Sep 2024 20:09:11 -0400
Subject: [PATCH] vGPU and Desktop in harmony
---
patches/blob-535.129.03.diff | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/patches/blob-535.129.03.diff b/patches/blob-535.129.03.diff
index 7b4d0c5..3789260 100644
--- a/patches/blob-535.129.03.diff
+++ b/patches/blob-535.129.03.diff
@@ -1,11 +1,7 @@
edbc8b765436d98ec9f380fe5876f9deae57d74995667d7805148785c6b0c811
-00447270: 41 8B
-00447271: BD 8F
-00447272: 40 54
-00447273: 00 02
-031406E8: 63 25
-031406E9: 6F 64
-031406EA: 75 20
-031406EB: 6E 25
-031406EC: 74 64
-ab66c4a02251e74aca4bb7f6d9e78eb0debdc538d8cbec586866bd8568e6abd3
+004471CC: 44 41
+004471CD: 8B C7
+004471CE: AF C5
+004471CF: 58 00
+004471D0: 02 00
+2c44a70686390b29259fdefad1f344cc9b4f019114afaee9f04483e1e55c70dd
--
2.46.1

View file

@ -17,10 +17,11 @@ license=('custom')
options=('!strip')
groups=('nvidia-merged')
# version. If the vGPU package version is different,
# version. If the vGPU package version is different than the general version
# it must be specified.
pkgver=535.129.03
_vgpupkgver=${pkgver}
pkgver=535.161.07
#_gnrlpkgver=535.161.07
_vgpupkgver=535.161.05
# FIXME: Do we really need to use ${CARCH}? As far as I'm aware
# the vGPU suite is x86_64 only.
@ -29,15 +30,11 @@ _vgpupkg="NVIDIA-Linux-${CARCH}-${_vgpupkgver}-vgpu-kvm"
_patchedpkg="NVIDIA-Linux-${CARCH}-${pkgver}-merged-vgpu-kvm-patched"
# revs for git repos
_patcher_rev="3765eee908858d069e7b31842f3486095b0846b5"
_patcher_rev="59c75f98baf4261cf42922ba2af5d413f56f0621"
source=(
'0001-Fix-NVIDIA-blob-patch-not-using-BASEDIR.patch'
'0002-vGPU-and-Desktop-in-harmony.patch'
'dkms-conftest-iosys-fix.patch'
'nvidia-iommu-api-fix.patch'
'nvidia-drm-defs-fix.patch'
'nvidia-eventfd-fix.patch'
'nvidia-follow-pfn-reimpl.patch'
'nvidia-smi'
@ -52,20 +49,16 @@ source=(
)
sha256sums=('ae6b1cf5cc5e177e5502ebed4b64f058524bf5514e1d6cda911e2966b2749b16'
'a66368ac6e409d002238dc6f5b1833bee1573e65386b0537bbcca9cc130b9d2a'
'594339458c2208936ee12e51de515173801566256983e524d67e1da1081e2260'
'437232dfa868999dd252ee95ee88625fb3e8231c0b705510904b6822512c56ba'
'f1e9e0d4ebbd35d14ef28c79f8ed8a0c22ff5e49765dd42119106f39078b4682'
'a26f0ee66e140be1f93e52ff965da59490a33b13f40c56629071eab2553ce48f'
'bd3f975e4b87bdc5135f4268bb99c6ae9c2719448221e80409bc10bdb9493764'
'eb51808257e7898d37d4575f40ada424cabf5dcad61017dd677ff5a0b25dead4'
'5ea0d9edfcf282cea9b204291716a9a4d6d522ba3a6bc28d78edf505b6dc7949'
'be99ff3def641bb900c2486cce96530394c5dc60548fc4642f19d3a4c784134d'
'd8d1caa5d72c71c6430c2a0d9ce1a674787e9272ccce28b9d5898ca24e60a167'
'0e54249a7754b668b436f0f7aa7e95fff68edbb12a93dbee4660e09a8c695f84'
'e6dca5626a2608c6bb2a046cfcb7c1af338b9e961a7dd90ac09bb8a126ff002e'
'2a53940da16c7c8bf001e5da0f53983192f4d09ec84cab713fbb424ac11df743'
'f3363d6cfef99147017329d08bedb81e473af91e7cda06d59576768a5a27b62f')
'edc527f1dcfa0212a3bf815ebf302d45ef9663834a41e11a851dd38da159a8cd'
'1b093e247eaa846a2dfe6d63e15a512d64b18e2a0c64bc413645d1d9ab5e08b3'
'df1fa34a35592cb8a38e8d6d365396f0caa8e6ca07088c0a711aa4177ade5c31')
create_links() {
# create soname links
@ -81,10 +74,8 @@ prepare() {
pushd 'vGPU-Unlock-patcher'
git submodule init
git submodule update
#sed -e 's/if $DO_VGPU; then/if false; then/' -i patch.sh
# apply patches to the patcher (ironic)
git am ${srcdir}/0001-Fix-NVIDIA-blob-patch-not-using-BASEDIR.patch
git am ${srcdir}/0002-vGPU-and-Desktop-in-harmony.patch
popd
vGPU-Unlock-patcher/patch.sh --force-nvidia-gpl-I-know-it-is-wrong --enable-nvidia-gpl-for-experimenting general-merge
@ -92,13 +83,10 @@ prepare() {
cd "${_patchedpkg}"
# patch kernel driver
patch -p1 < ../dkms-conftest-iosys-fix.patch
patch -p1 < ../nvidia-iommu-api-fix.patch
patch -p1 < ../nvidia-drm-defs-fix.patch
[[ "${_use_new_patches}" == "true" ]] && {
echo "Enabling linux 6.1x support patches"
patch -p1 < ../nvidia-eventfd-fix.patch
patch -p1 < ../nvidia-follow-pfn-reimpl.patch
};

View file

@ -1,15 +0,0 @@
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -5071,6 +5071,11 @@
CODE="
#include <drm/drm_gem.h>
+ #if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
+ typedef struct iosys_map nv_sysio_map_t;
+ #else
+ typedef struct dma_buf_map nv_sysio_map_t;
+ #endif
int conftest_drm_gem_object_vmap_has_map_arg(
- struct drm_gem_object *obj, struct dma_buf_map *map) {
+ struct drm_gem_object *obj, nv_sysio_map_t *map) {
return obj->funcs->vmap(obj, map);
}"

View file

@ -1,22 +0,0 @@
diff --git a/usr/src/nvidia-535.129.03-orig/nvidia-vgpu-vfio/nvidia-vgpu-vfio.c b/kernel/nvidia-vgpu-vfio/nvidia-vgpu-vfio.c
index a2620f6..b1f434f 100644
--- a/usr/src/nvidia-535.129.03-orig/nvidia-vgpu-vfio/nvidia-vgpu-vfio.c
+++ b/kernel/nvidia-vgpu-vfio/nvidia-vgpu-vfio.c
@@ -2872,7 +2872,7 @@ static irqreturn_t vgpu_msix_handler(int irq, void *arg)
}
if (trigger != NULL)
- eventfd_signal(trigger, 1);
+ eventfd_signal(trigger);
else
return IRQ_NONE;
@@ -3185,7 +3185,7 @@ NV_STATUS nv_vgpu_inject_interrupt(void *vgpuRef)
}
NV_SPIN_UNLOCK_IRQRESTORE(&vgpu_dev->intr_info_lock, eflags);
- eventfd_signal(trigger, 1);
+ eventfd_signal(trigger);
return status;
}

View file

@ -1,22 +0,0 @@
diff --git a/usr/src/nvidia-535.129.03-orig/nvidia/nv-pci.c b/kernel/nvidia/nv-pci.c
index 326833e..74ac5c7 100644
--- a/usr/src/nvidia-535.129.03-orig/nvidia/nv-pci.c
+++ b/kernel/nvidia/nv-pci.c
@@ -31,6 +31,7 @@
#if defined(NV_VGPU_KVM_BUILD)
#include "nv-vgpu-vfio-interface.h"
+#include <linux/iommu.h> /** iommu_present */
#endif
#if defined(NV_SEQ_READ_ITER_PRESENT)
@@ -212,7 +213,8 @@ nv_pci_probe
goto failed;
}
- if (pci_dev->dev.bus->iommu_ops == NULL)
+ //if (pci_dev->dev.bus->iommu_ops == NULL)
+ if(!iommu_present(pci_dev->dev.bus))
{
nv = NV_STATE_PTR(nvl);
if (rm_is_iommu_needed_for_sriov(sp, nv))