virtualbox ver. bump

This commit is contained in:
Rmys
2025-07-25 18:19:04 +03:00
parent ab84eb648e
commit ee90cf2351
8 changed files with 205 additions and 14 deletions
@@ -67,6 +67,8 @@ def build():
shelltools.system("patch -p1 < kernel-6.5.patch")
shelltools.system("patch -p1 < kernel-6.6.patch")
shelltools.system("patch -p1 < kernel-6.8.patch")
shelltools.system("patch -p1 < kernel-6.10.patch")
shelltools.system("patch -p1 < kernel-6.12.patch")
shelltools.export("SYSSRC", "/lib/modules/%s/build" % KDIR)
shelltools.cd("kernel")
@@ -0,0 +1,65 @@
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
index a9db899..4da7588 100755
--- a/kernel/conftest.sh
+++ b/kernel/conftest.sh
@@ -4464,20 +4464,22 @@ compile_test() {
compile_check_conftest "$CODE" "NV_DRM_GEM_OBJECT_VMAP_HAS_MAP_ARG" "" "types"
;;
- unsafe_follow_pfn)
+ follow_pfn)
#
- # Determine if unsafe_follow_pfn() is present.
+ # Determine if follow_pfn() is present.
#
- # unsafe_follow_pfn() was added by commit 69bacee7f9ad
- # ("mm: Add unsafe_follow_pfn") in v5.13-rc1.
+ # follow_pfn() was added by commit 3b6748e2dd69
+ # ("mm: introduce follow_pfn()") in v2.6.31-rc1, and removed
+ # by commit 233eb0bf3b94 ("mm: remove follow_pfn")
+ # from linux-next 233eb0bf3b94.
#
CODE="
#include <linux/mm.h>
- void conftest_unsafe_follow_pfn(void) {
- unsafe_follow_pfn();
+ void conftest_follow_pfn(void) {
+ follow_pfn();
}"
- compile_check_conftest "$CODE" "NV_UNSAFE_FOLLOW_PFN_PRESENT" "" "functions"
+ compile_check_conftest "$CODE" "NV_FOLLOW_PFN_PRESENT" "" "functions"
;;
drm_plane_atomic_check_has_atomic_state_arg)
diff --git a/kernel/nvidia/nvidia.Kbuild b/kernel/nvidia/nvidia.Kbuild
index d6995ca..3a3dd17 100644
--- a/kernel/nvidia/nvidia.Kbuild
+++ b/kernel/nvidia/nvidia.Kbuild
@@ -165,7 +165,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_raw_ts64
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ktime_get_real_ts64
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ioremap_nocache
NV_CONFTEST_FUNCTION_COMPILE_TESTS += vga_tryget
-NV_CONFTEST_FUNCTION_COMPILE_TESTS += unsafe_follow_pfn
+NV_CONFTEST_FUNCTION_COMPILE_TESTS += follow_pfn
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_bus_get_device
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_video_backlight_use_native
diff --git a/kernel/nvidia/os-mlock.c b/kernel/nvidia/os-mlock.c
index f88daed..9e1bd0c 100644
--- a/kernel/nvidia/os-mlock.c
+++ b/kernel/nvidia/os-mlock.c
@@ -18,10 +18,10 @@ static inline int nv_follow_pfn(struct vm_area_struct *vma,
unsigned long address,
unsigned long *pfn)
{
-#if defined(NV_UNSAFE_FOLLOW_PFN_PRESENT)
- return unsafe_follow_pfn(vma, address, pfn);
-#else
+#if defined(NV_FOLLOW_PFN_PRESENT)
return follow_pfn(vma, address, pfn);
+#else
+ return -1;
#endif
}
@@ -0,0 +1,94 @@
diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
index 1291893..53dfad8 100644
--- a/kernel/nvidia-drm/nvidia-drm-drv.c
+++ b/kernel/nvidia-drm/nvidia-drm-drv.c
@@ -84,6 +84,10 @@
#include <drm/drm_atomic_helper.h>
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+#include <drm/drm_client.h>
+#endif
+
static struct nv_drm_device *dev_list = NULL;
#if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
@@ -168,7 +172,12 @@ static const struct drm_mode_config_funcs nv_mode_config_funcs = {
.atomic_check = nv_drm_atomic_check,
.atomic_commit = nv_drm_atomic_commit,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0)
+ // Rel. commit. "drm: Remove struct drm_mode_config_funcs.output_poll_changed" (Thomas Zimmermann, 12 Aug 2024)
+ // Replace this callback with a DRM client's hotplug callback.
+ // This is required for e.g. /sys/class/drm/card*/modes to work.
.output_poll_changed = nv_drm_output_poll_changed,
+#endif
};
static void nv_drm_event_callback(const struct NvKmsKapiEvent *event)
@@ -652,6 +661,10 @@ static const struct file_operations nv_drm_fops = {
.read = drm_read,
.llseek = noop_llseek,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+ // Rel. commit. "fs: move FMODE_UNSIGNED_OFFSET to fop_flags" (Christian Brauner, 9 Aug 2024)
+ .fop_flags = FOP_UNSIGNED_OFFSET,
+#endif
};
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
@@ -790,7 +803,18 @@ static void nv_drm_update_drm_driver_features(void)
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+static int hotplug_helper_client_hotplug(struct drm_client_dev *client)
+{
+ nv_drm_output_poll_changed(client->dev);
+ return 0;
+}
+static const struct drm_client_funcs nv_hotplug_helper_client_funcs = {
+ .owner = THIS_MODULE,
+ .hotplug = hotplug_helper_client_hotplug,
+};
+#endif
/*
* Helper function for allocate/register DRM device for given NVIDIA GPU ID.
@@ -844,6 +868,20 @@ static void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
goto failed_drm_register;
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+ /* Register a DRM client for receiving hotplug events */
+ struct drm_client_dev *client = kzalloc(sizeof(*client), GFP_KERNEL);
+ if (client == NULL || drm_client_init(dev, client,
+ "nv-hotplug-helper", &nv_hotplug_helper_client_funcs)) {
+ printk(KERN_WARNING "Failed to initialize the nv-hotplug-helper DRM client"
+ " (ensure DRM kernel mode setting is enabled via nvidia-drm.modeset=1).\n");
+ goto failed_drm_client_init;
+ }
+
+ drm_client_register(client);
+ pr_info("Registered the nv-hotplug-helper DRM client.\n");
+#endif
+
/* Add NVIDIA-DRM device into list */
nv_dev->next = dev_list;
@@ -851,6 +889,14 @@ static void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
return; /* Success */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 12, 0)
+failed_drm_client_init:
+
+ kfree(client);
+ drm_dev_unregister(dev);
+
+#endif
+
failed_drm_register:
nv_drm_dev_free(dev);
+11 -2
View File
@@ -24,9 +24,11 @@
<AdditionalFile owner="root" permission="0644" target="kernel-6.5.patch">kernel-6.5.patch</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="kernel-6.6.patch">kernel-6.6.patch</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="kernel-6.8.patch">kernel-6.8.patch</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="kernel-6.10.patch">kernel-6.10.patch</AdditionalFile>
<AdditionalFile owner="root" permission="0644" target="kernel-6.12.patch">kernel-6.12.patch</AdditionalFile>
</AdditionalFiles>
<BuildDependencies>
<Dependency version="6.6.92">kernel-module-headers</Dependency>
<Dependency version="6.12.40">kernel-module-headers</Dependency>
<Dependency>libX11-devel</Dependency>
<Dependency>gtk2-devel</Dependency>
<Dependency>gtk3-devel</Dependency>
@@ -38,7 +40,7 @@
<IsA>driver</IsA>
<Summary>Kernel module for current NVIDIA graphics driver releases</Summary>
<RuntimeDependencies>
<Dependency version="6.6.92">kernel</Dependency>
<Dependency version="6.12.40">kernel</Dependency>
<!-- <Dependency release="current">module-nvidia-current-userspace</Dependency> -->
</RuntimeDependencies>
<Files>
@@ -202,6 +204,13 @@
</Package>
<History>
<Update release="60">
<Date>2025-07-25</Date>
<Version>390.157</Version>
<Comment>Rebuild.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>
</Update>
<Update release="59">
<Date>2025-05-24</Date>
<Version>390.157</Version>