diff options
author | Fabio Rossi <rossi.f@inwind.it> | 2020-04-12 21:40:51 +0200 |
---|---|---|
committer | Fabio Rossi <rossi.f@inwind.it> | 2020-04-12 21:40:51 +0200 |
commit | 8f25a120312a9cf7a3c81060e9da2bc3ec4d6bed (patch) | |
tree | dbb86f3660dd6916dcc12ff843bf08dcf3a43ceb /app-emulation/vmware-modules | |
parent | app-emulation/vmware-modules: changes for kernel 5.5 (diff) | |
download | vmware-8f25a120312a9cf7a3c81060e9da2bc3ec4d6bed.tar.gz vmware-8f25a120312a9cf7a3c81060e9da2bc3ec4d6bed.tar.bz2 vmware-8f25a120312a9cf7a3c81060e9da2bc3ec4d6bed.zip |
app-emulation/vmware-modules: fixes for kernel 5.6
Added patches to face the following upstream commits:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d56c0d45f0e27f814e87a1676b6bdccccbc252e9
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4bdc0d676a643140bdf17dbf7eafedee3d496a3c
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c766d1472c70d25ad475cf56042af1652e792b23
Signed-off-by: Fabio Rossi <rossi.f@inwind.it>
Diffstat (limited to 'app-emulation/vmware-modules')
4 files changed, 83 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/308-5.06-00-proc_create.patch b/app-emulation/vmware-modules/files/308-5.06-00-proc_create.patch new file mode 100644 index 0000000..f2248dc --- /dev/null +++ b/app-emulation/vmware-modules/files/308-5.06-00-proc_create.patch @@ -0,0 +1,46 @@ +--- ./vmblock-only/linux/control.c 2020-04-11 16:28:51.246510041 +0200 ++++ ./vmblock-only/linux/control.c.new 2020-04-11 16:55:29.826634425 +0200 +@@ -46,12 +46,18 @@ + + + static struct proc_dir_entry *controlProcDirEntry; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) + struct file_operations ControlFileOps = { + .owner = THIS_MODULE, + .write = ControlFileOpWrite, + .release = ControlFileOpRelease, + }; +- ++#else ++struct proc_ops ControlFileOps = { ++ .proc_write = ControlFileOpWrite, ++ .proc_release = ControlFileOpRelease, ++}; ++#endif + + /* Public initialization/cleanup routines */ + +--- ./vmnet-only/procfs.c 2018-01-09 08:13:21.000000000 +0100 ++++ ./vmnet-only/procfs.c.new 2020-04-11 17:28:05.017786557 +0200 +@@ -161,12 +161,21 @@ + } + + /* Our procfs callbacks. We only need to specialize open. */ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) + static struct file_operations fops = { + .open = VNetProcOpen, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, + }; ++#else ++static struct proc_ops fops = { ++ .proc_open = VNetProcOpen, ++ .proc_read = seq_read, ++ .proc_lseek = seq_lseek, ++ .proc_release = single_release, ++}; ++#endif + #endif + + diff --git a/app-emulation/vmware-modules/files/308-5.06-01-ioremap_nocache.patch b/app-emulation/vmware-modules/files/308-5.06-01-ioremap_nocache.patch new file mode 100644 index 0000000..0c9b325 --- /dev/null +++ b/app-emulation/vmware-modules/files/308-5.06-01-ioremap_nocache.patch @@ -0,0 +1,14 @@ +--- ./vmmon-only/linux/hostif.c 2020-04-11 17:06:49.676687324 +0200 ++++ ./vmmon-only/linux/hostif.c.new 2020-04-11 17:24:17.482768853 +0200 +@@ -2335,7 +2335,11 @@ + volatile void *hostapic; + + ASSERT_ON_COMPILE(APICR_SIZE <= PAGE_SIZE); ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) + hostapic = (volatile void *) ioremap_nocache(ma, PAGE_SIZE); ++#else ++ hostapic = (volatile void *) ioremap(ma, PAGE_SIZE); ++#endif + if (hostapic) { + if ((APIC_VERSIONREG(hostapic) & 0xF0) == 0x10) { + vm->hostAPIC.base = (volatile uint32 (*)[4]) hostapic; diff --git a/app-emulation/vmware-modules/files/308-5.06-02-timeval.patch b/app-emulation/vmware-modules/files/308-5.06-02-timeval.patch new file mode 100644 index 0000000..a075c1f --- /dev/null +++ b/app-emulation/vmware-modules/files/308-5.06-02-timeval.patch @@ -0,0 +1,20 @@ +--- ./vsock-only/linux/af_vsock.c 2020-04-11 17:30:47.815799224 +0200 ++++ ./vsock-only/linux/af_vsock.c.new 2020-04-11 18:04:49.565958091 +0200 +@@ -4415,7 +4415,7 @@ + break; + + case SO_VMCI_CONNECT_TIMEOUT: { +- struct timeval tv; ++ struct __kernel_old_timeval tv; + COPY_IN(tv); + if (tv.tv_sec >= 0 && tv.tv_usec < USEC_PER_SEC && + tv.tv_sec < (MAX_SCHEDULE_TIMEOUT/HZ - 1)) { +@@ -4510,7 +4510,7 @@ + break; + + case SO_VMCI_CONNECT_TIMEOUT: { +- struct timeval tv; ++ struct __kernel_old_timeval tv; + tv.tv_sec = vsk->connectTimeout / HZ; + tv.tv_usec = (vsk->connectTimeout - tv.tv_sec * HZ) * (1000000 / HZ); + COPY_OUT(tv); 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 107bfbf..808905a 100644 --- a/app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild +++ b/app-emulation/vmware-modules/vmware-modules-308.5.9.ebuild @@ -133,6 +133,9 @@ src_prepare() { kernel_is ge 5 01 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.01-01-kernel_ds.patch" kernel_is ge 5 03 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.03-00-force_sig.patch" kernel_is ge 5 04 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.04-00-skb_frag_t.patch" + kernel_is ge 5 06 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.06-00-proc_create.patch" + kernel_is ge 5 06 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.06-01-ioremap_nocache.patch" + kernel_is ge 5 06 0 && epatch "${FILESDIR}/${PV_MAJOR}-5.06-02-timeval.patch" # Allow user patches so they can support RC kernels and whatever else epatch_user |