summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Rossi <rossi.f@inwind.it>2017-11-04 00:31:24 +0100
committerFabio Rossi <rossi.f@inwind.it>2017-11-04 00:31:24 +0100
commitf52a32ebbed4e06c26456ca69a0a837aeb1ff90c (patch)
tree0fda13acc8046795eb577b0cf5c863a30716101c /app-emulation
parentapp-emulation/vmware-modules: fix page accounting (diff)
downloadvmware-f52a32ebbed4e06c26456ca69a0a837aeb1ff90c.tar.gz
vmware-f52a32ebbed4e06c26456ca69a0a837aeb1ff90c.tar.bz2
vmware-f52a32ebbed4e06c26456ca69a0a837aeb1ff90c.zip
app-emulation/vmware-modules: add support to kernel 4.14
Added two patches to build vmware-modules with latest 4.14-rcX One patch tracks kernel changes introduced with c41f012ade0b95b0a6e25c7150673e0554736165. The other patch fixes changes introduced with 7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba (in this case kernel changes were already available since kernel 4.10 but they produced a build failure only with kernel 4.14-rcX)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/vmware-modules/files/308-4.14-00-vmmon-global-page-state.patch14
-rw-r--r--app-emulation/vmware-modules/files/308-4.14-01-deprecated-asm-uaccess.patch50
-rw-r--r--app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild2
3 files changed, 66 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/308-4.14-00-vmmon-global-page-state.patch b/app-emulation/vmware-modules/files/308-4.14-00-vmmon-global-page-state.patch
new file mode 100644
index 0000000..85de302
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-4.14-00-vmmon-global-page-state.patch
@@ -0,0 +1,14 @@
+--- vmmon-only/linux/hostif.c 2017-10-26 00:46:14.312597372 +0200
++++ vmmon-only/linux/hostif.c.new 2017-10-26 00:49:16.419607555 +0200
+@@ -1595,7 +1595,11 @@
+ unsigned int reservedPages = MEMDEFAULTS_MIN_HOST_PAGES;
+ unsigned int hugePages = (vm == NULL) ? 0 :
+ BYTES_2_PAGES(vm->memInfo.hugePageBytes);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
++ unsigned int lockedPages = global_zone_page_state(NR_PAGETABLE) +
++#else
+ unsigned int lockedPages = global_page_state(NR_PAGETABLE) +
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
+ global_node_page_state(NR_SLAB_UNRECLAIMABLE) +
+ #else
diff --git a/app-emulation/vmware-modules/files/308-4.14-01-deprecated-asm-uaccess.patch b/app-emulation/vmware-modules/files/308-4.14-01-deprecated-asm-uaccess.patch
new file mode 100644
index 0000000..4ee38f9
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-4.14-01-deprecated-asm-uaccess.patch
@@ -0,0 +1,50 @@
+--- vmblock-only/linux/control.c 2017-10-26 00:35:44.391562150 +0200
++++ vmblock-only/linux/control.c.new 2017-10-26 00:44:31.803591641 +0200
+@@ -29,7 +29,7 @@
+ #include <linux/stat.h>
+ #include <linux/fs.h>
+
+-#include <asm/uaccess.h>
++#include <linux/uaccess.h>
+
+ #include "vmblockInt.h"
+ #include "block.h"
+--- ./vsock-only/shared/compat_uaccess.h 2017-06-20 04:29:39.000000000 +0200
++++ ./vsock-only/shared/compat_uaccess.h.new 2017-10-26 01:09:20.867674903 +0200
+@@ -21,7 +21,9 @@
+
+
+ /* User space access functions moved in 2.1.7 to asm/uaccess.h --hpreg */
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
++# include <linux/uaccess.h>
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
+ # include <asm/uaccess.h>
+ #else
+ # include <asm/segment.h>
+--- ./vmci-only/shared/compat_uaccess.h 2017-06-20 04:29:39.000000000 +0200
++++ ./vmci-only/shared/compat_uaccess.h.new 2017-10-26 01:08:43.547672817 +0200
+@@ -21,7 +21,9 @@
+
+
+ /* User space access functions moved in 2.1.7 to asm/uaccess.h --hpreg */
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
++# include <linux/uaccess.h>
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
+ # include <asm/uaccess.h>
+ #else
+ # include <asm/segment.h>
+--- ./vmblock-only/shared/compat_uaccess.h 2017-06-20 04:29:39.000000000 +0200
++++ ./vmblock-only/shared/compat_uaccess.h.new 2017-10-26 01:07:48.915669762 +0200
+@@ -21,7 +21,9 @@
+
+
+ /* User space access functions moved in 2.1.7 to asm/uaccess.h --hpreg */
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
++# include <linux/uaccess.h>
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 7)
+ # include <asm/uaccess.h>
+ #else
+ # include <asm/segment.h>
diff --git a/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild b/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild
index 8987a1d..0f74914 100644
--- a/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-308.5.7.ebuild
@@ -112,6 +112,8 @@ src_prepare() {
kernel_is ge 4 12 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.12-02-vmci-pci_enable_msix.patch"
kernel_is ge 4 13 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.13-00-vmnet-refcount.patch"
kernel_is ge 4 13 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.13-01-vmmon-fix-page-accounting.patch"
+ kernel_is ge 4 14 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.14-00-vmmon-global-page-state.patch"
+ kernel_is ge 4 14 0 && epatch "${FILESDIR}/${PV_MAJOR}-4.14-01-deprecated-asm-uaccess.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user