diff options
author | Evan Teran <evan.teran@gmail.com> | 2017-04-05 10:49:40 -0400 |
---|---|---|
committer | Evan Teran <evan.teran@gmail.com> | 2017-04-05 10:49:40 -0400 |
commit | 21f2f9477ccb35e04fefed3c0bc3d4c724ab0255 (patch) | |
tree | f2b5d63d2556a9ffa98ba79f30a40a2a66f9606f /app-emulation/vmware-modules/files | |
parent | Added latest version 12.5.4.5192485 (diff) | |
download | vmware-21f2f9477ccb35e04fefed3c0bc3d4c724ab0255.tar.gz vmware-21f2f9477ccb35e04fefed3c0bc3d4c724ab0255.tar.bz2 vmware-21f2f9477ccb35e04fefed3c0bc3d4c724ab0255.zip |
adding support for 4.9 kernels to vmware-modules 304 (workstation 11)
Diffstat (limited to 'app-emulation/vmware-modules/files')
-rw-r--r-- | app-emulation/vmware-modules/files/304-4.9-00-get_user_pages.patch | 20 | ||||
-rw-r--r-- | app-emulation/vmware-modules/files/304-4.9-01-get_user_pages.patch | 20 |
2 files changed, 40 insertions, 0 deletions
diff --git a/app-emulation/vmware-modules/files/304-4.9-00-get_user_pages.patch b/app-emulation/vmware-modules/files/304-4.9-00-get_user_pages.patch new file mode 100644 index 0000000..9b7e0a4 --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.9-00-get_user_pages.patch @@ -0,0 +1,20 @@ +--- vmmon-only.bak/linux/hostif.c 2017-04-05 10:10:24.522070886 -0400 ++++ vmmon-only/linux/hostif.c 2017-04-05 10:13:35.871077701 -0400 +@@ -1171,12 +1171,16 @@ HostIFGetUserPages(void *uvAddr, + int retval; + + down_read(¤t->mm->mmap_sem); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL); ++#else + #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); ++#endif + up_read(¤t->mm->mmap_sem); + + return retval != numPages; + diff --git a/app-emulation/vmware-modules/files/304-4.9-01-get_user_pages.patch b/app-emulation/vmware-modules/files/304-4.9-01-get_user_pages.patch new file mode 100644 index 0000000..0858beb --- /dev/null +++ b/app-emulation/vmware-modules/files/304-4.9-01-get_user_pages.patch @@ -0,0 +1,20 @@ +diff -rupN vmnet-only.bak/userif.c vmnet-only/userif.c +--- vmnet-only.bak/userif.c 2017-04-05 10:44:29.166143701 -0400 ++++ vmnet-only/userif.c 2017-04-05 10:45:46.443146453 -0400 +@@ -113,12 +113,16 @@ UserifLockPage(VA addr) // IN + int retval; + + down_read(¤t->mm->mmap_sem); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) ++ retval = get_user_pages(addr, 1, FOLL_WRITE, &page, NULL); ++#else + #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); ++#endif + up_read(¤t->mm->mmap_sem); + + if (retval != 1) { |