summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Rossi <rossi.f@inwind.it>2016-05-19 19:52:06 +0200
committerFabio Rossi <rossi.f@inwind.it>2016-05-19 19:52:06 +0200
commit10131c0123b70c9731716d8e2b1acd37040cbf64 (patch)
tree7e929b9dd8eeea35460bc379b3ba328b29d16a14 /app-emulation/vmware-modules
parentAdded latest version 12.1.1.3770994 (diff)
downloadvmware-10131c0123b70c9731716d8e2b1acd37040cbf64.tar.gz
vmware-10131c0123b70c9731716d8e2b1acd37040cbf64.tar.bz2
vmware-10131c0123b70c9731716d8e2b1acd37040cbf64.zip
app-emulation/vmware-modules: add support to kernel 4.6
This closes https://github.com/gentoo/vmware/pull/23 and bug #583244
Diffstat (limited to 'app-emulation/vmware-modules')
-rw-r--r--app-emulation/vmware-modules/files/304-4.6-00-user-pages.patch84
-rw-r--r--app-emulation/vmware-modules/files/308-4.06-00-user-pages.patch84
-rw-r--r--app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild1
-rw-r--r--app-emulation/vmware-modules/vmware-modules-308.1.1.ebuild1
4 files changed, 170 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/304-4.6-00-user-pages.patch b/app-emulation/vmware-modules/files/304-4.6-00-user-pages.patch
new file mode 100644
index 0000000..dc677c2
--- /dev/null
+++ b/app-emulation/vmware-modules/files/304-4.6-00-user-pages.patch
@@ -0,0 +1,84 @@
+--- ./vmci-only/linux/driver.c.old 2016-05-19 19:00:09.784669042 +0200
++++ ./vmci-only/linux/driver.c 2016-05-19 19:00:47.480671150 +0200
+@@ -1468,7 +1468,11 @@
+ int retval;
+
+ down_read(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages(addr,
++#else
+ retval = get_user_pages(current, current->mm, addr,
++#endif
+ 1, 1, 0, &page, NULL);
+ up_read(&current->mm->mmap_sem);
+
+--- ./vmci-only/linux/vmciKernelIf.c.old 2016-05-19 18:57:04.344658673 +0200
++++ ./vmci-only/linux/vmciKernelIf.c 2016-05-19 19:03:28.600680159 +0200
+@@ -1835,7 +1835,11 @@
+ if (dirty) {
+ set_page_dirty(pages[i]);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ put_page(pages[i]);
++#else
+ page_cache_release(pages[i]);
++#endif
+ pages[i] = NULL;
+ }
+ }
+@@ -2049,9 +2053,13 @@
+ int err = VMCI_SUCCESS;
+
+ down_write(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages((VA)produceUVA,
++#else
+ retval = get_user_pages(current,
+ current->mm,
+ (VA)produceUVA,
++#endif
+ produceQ->kernelIf->numPages,
+ 1, 0,
+ produceQ->kernelIf->u.h.headerPage,
+@@ -2063,9 +2071,13 @@
+ goto out;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages((VA)consumeUVA,
++#else
+ retval = get_user_pages(current,
+ current->mm,
+ (VA)consumeUVA,
++#endif
+ consumeQ->kernelIf->numPages,
+ 1, 0,
+ consumeQ->kernelIf->u.h.headerPage,
+--- ./vmmon-only/linux/hostif.c.old 2016-05-19 18:50:42.872637343 +0200
++++ ./vmmon-only/linux/hostif.c 2016-05-19 18:53:40.208647259 +0200
+@@ -1163,7 +1163,11 @@
+ int retval;
+
+ down_read(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages((unsigned long)uvAddr,
++#else
+ retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
++#endif
+ numPages, 0, 0, ppages, NULL);
+ up_read(&current->mm->mmap_sem);
+
+--- ./vmnet-only/userif.c.old 2016-05-19 18:52:45.904644222 +0200
++++ ./vmnet-only/userif.c 2016-05-19 18:53:28.599646610 +0200
+@@ -113,7 +113,11 @@
+ int retval;
+
+ down_read(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages(addr,
++#else
+ retval = get_user_pages(current, current->mm, addr,
++#endif
+ 1, 1, 0, &page, NULL);
+ up_read(&current->mm->mmap_sem);
+
diff --git a/app-emulation/vmware-modules/files/308-4.06-00-user-pages.patch b/app-emulation/vmware-modules/files/308-4.06-00-user-pages.patch
new file mode 100644
index 0000000..dc677c2
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-4.06-00-user-pages.patch
@@ -0,0 +1,84 @@
+--- ./vmci-only/linux/driver.c.old 2016-05-19 19:00:09.784669042 +0200
++++ ./vmci-only/linux/driver.c 2016-05-19 19:00:47.480671150 +0200
+@@ -1468,7 +1468,11 @@
+ int retval;
+
+ down_read(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages(addr,
++#else
+ retval = get_user_pages(current, current->mm, addr,
++#endif
+ 1, 1, 0, &page, NULL);
+ up_read(&current->mm->mmap_sem);
+
+--- ./vmci-only/linux/vmciKernelIf.c.old 2016-05-19 18:57:04.344658673 +0200
++++ ./vmci-only/linux/vmciKernelIf.c 2016-05-19 19:03:28.600680159 +0200
+@@ -1835,7 +1835,11 @@
+ if (dirty) {
+ set_page_dirty(pages[i]);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ put_page(pages[i]);
++#else
+ page_cache_release(pages[i]);
++#endif
+ pages[i] = NULL;
+ }
+ }
+@@ -2049,9 +2053,13 @@
+ int err = VMCI_SUCCESS;
+
+ down_write(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages((VA)produceUVA,
++#else
+ retval = get_user_pages(current,
+ current->mm,
+ (VA)produceUVA,
++#endif
+ produceQ->kernelIf->numPages,
+ 1, 0,
+ produceQ->kernelIf->u.h.headerPage,
+@@ -2063,9 +2071,13 @@
+ goto out;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages((VA)consumeUVA,
++#else
+ retval = get_user_pages(current,
+ current->mm,
+ (VA)consumeUVA,
++#endif
+ consumeQ->kernelIf->numPages,
+ 1, 0,
+ consumeQ->kernelIf->u.h.headerPage,
+--- ./vmmon-only/linux/hostif.c.old 2016-05-19 18:50:42.872637343 +0200
++++ ./vmmon-only/linux/hostif.c 2016-05-19 18:53:40.208647259 +0200
+@@ -1163,7 +1163,11 @@
+ int retval;
+
+ down_read(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages((unsigned long)uvAddr,
++#else
+ retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
++#endif
+ numPages, 0, 0, ppages, NULL);
+ up_read(&current->mm->mmap_sem);
+
+--- ./vmnet-only/userif.c.old 2016-05-19 18:52:45.904644222 +0200
++++ ./vmnet-only/userif.c 2016-05-19 18:53:28.599646610 +0200
+@@ -113,7 +113,11 @@
+ int retval;
+
+ down_read(&current->mm->mmap_sem);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 99)
++ retval = get_user_pages(addr,
++#else
+ retval = get_user_pages(current, current->mm, addr,
++#endif
+ 1, 1, 0, &page, NULL);
+ up_read(&current->mm->mmap_sem);
+
diff --git a/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild b/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild
index 86bea59..c56f4de 100644
--- a/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-304.3-r1.ebuild
@@ -101,6 +101,7 @@ src_prepare() {
kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.2-03-vsock.patch"
kernel_is ge 4 3 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.3-00-misc_deregister.patch"
kernel_is ge 4 5 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.5-00-get_link.patch"
+ kernel_is ge 4 6 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.6-00-user-pages.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user
diff --git a/app-emulation/vmware-modules/vmware-modules-308.1.1.ebuild b/app-emulation/vmware-modules/vmware-modules-308.1.1.ebuild
index 0412eca..a7e1daa 100644
--- a/app-emulation/vmware-modules/vmware-modules-308.1.1.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-308.1.1.ebuild
@@ -101,6 +101,7 @@ src_prepare() {
kernel_is ge 4 2 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.02-01-sk_alloc.patch"
kernel_is ge 4 3 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.03-00-vmci-misc_deregister.patch"
kernel_is ge 4 5 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.05-00-vmblock-follow_link.patch"
+ kernel_is ge 4 6 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.06-00-user-pages.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user