summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Rossi <rossi.f@inwind.it>2019-05-04 17:41:47 +0200
committerFabio Rossi <rossi.f@inwind.it>2019-05-04 17:41:47 +0200
commite7bbf218ad06ddda606a729a2b8e381e4032d1d9 (patch)
tree227d60ca6e3e9edaa475a2046af0fa161db3c628
parentapp-emulation/vmware-modules: updated also Manifest (diff)
downloadvmware-e7bbf218ad06ddda606a729a2b8e381e4032d1d9.tar.gz
vmware-e7bbf218ad06ddda606a729a2b8e381e4032d1d9.tar.bz2
vmware-e7bbf218ad06ddda606a729a2b8e381e4032d1d9.zip
app-emulation/vmware-modules: fixes for kernel 5.1
Added two patches to face the following upstream commits: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=736706bee3298208343a76096370e4f6a5c55915 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d3539018d2cbd12e5af4a132636ee7fd8d43ef0
-rw-r--r--app-emulation/vmware-modules/files/308-5.01-00-vm_fault_t.patch25
-rw-r--r--app-emulation/vmware-modules/files/308-5.01-01-kernel_ds.patch38
-rw-r--r--app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild2
3 files changed, 65 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/308-5.01-00-vm_fault_t.patch b/app-emulation/vmware-modules/files/308-5.01-00-vm_fault_t.patch
new file mode 100644
index 0000000..09f6376
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-5.01-00-vm_fault_t.patch
@@ -0,0 +1,25 @@
+--- ./vmmon-only/linux/driver.c 2019-05-04 17:14:03.601828954 +0200
++++ ./vmmon-only/linux/driver.c.new 2019-05-04 17:31:37.452910953 +0200
+@@ -104,7 +104,9 @@
+
+ static int LinuxDriver_Close(struct inode *inode, struct file *filp);
+ static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
++static vm_fault_t LinuxDriverFault(struct vm_fault *fault);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+ static int LinuxDriverFault(struct vm_fault *fault);
+ #elif defined(VMW_NOPAGE_2624)
+ static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault);
+@@ -924,7 +926,10 @@
+ *-----------------------------------------------------------------------------
+ */
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
++static vm_fault_t
++LinuxDriverFault(struct vm_fault *fault) //IN/OUT
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+ static int
+ LinuxDriverFault(struct vm_fault *fault) //IN/OUT
+ #elif defined(VMW_NOPAGE_2624)
diff --git a/app-emulation/vmware-modules/files/308-5.01-01-kernel_ds.patch b/app-emulation/vmware-modules/files/308-5.01-01-kernel_ds.patch
new file mode 100644
index 0000000..911d691
--- /dev/null
+++ b/app-emulation/vmware-modules/files/308-5.01-01-kernel_ds.patch
@@ -0,0 +1,38 @@
+--- ./vmmon-only/linux/hostif.c 2019-05-04 17:33:42.135920654 +0200
++++ ./vmmon-only/linux/hostif.c.new 2019-05-04 17:37:02.428936239 +0200
+@@ -2298,7 +2298,11 @@
+ int ret;
+
+ old_fs = get_fs();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
++ set_fs(KERNEL_DS);
++#else
+ set_fs(get_ds());
++#endif
+ r = APICR_TO_ADDR(r, APICR_VERSION);
+ ret = HostIF_CopyFromUser(&dummy, (void*)r, sizeof(dummy));
+ set_fs(old_fs);
+@@ -2499,7 +2503,11 @@
+ }
+
+ old_fs = get_fs();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
++ set_fs(KERNEL_DS);
++#else
+ set_fs(get_ds());
++#endif
+
+ {
+ struct poll_wqueues table;
+@@ -2628,7 +2636,11 @@
+ }
+
+ old_fs = get_fs();
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
++ set_fs(KERNEL_DS);
++#else
+ set_fs(get_ds());
++#endif
+
+ /*
+ * Always write sizeof(uint64) bytes. This works fine for eventfd and
diff --git a/app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild b/app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild
index ccb687a..933f0df 100644
--- a/app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild
+++ b/app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild
@@ -124,6 +124,8 @@ src_prepare() {
kernel_is ge 5 00 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.00-00-totalram_pages.patch"
kernel_is ge 5 00 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.00-01-access_ok.patch"
kernel_is ge 5 00 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.00-02-do_gettimeofday.patch"
+ kernel_is ge 5 01 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.01-00-vm_fault_t.patch"
+ kernel_is ge 5 01 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.01-01-kernel_ds.patch"
# Allow user patches so they can support RC kernels and whatever else
epatch_user