VMware – Updated vmnet Patch for Kernel 4.9/4.10..

Thanks to Mikkel Kroman, there is a more complete patch for VMware 12.5.2  vmnet on Kernel 4.9.x and 4.10-rc’s:

The change is to the get_user_pages parameter list, to now include the FOLL_WRITE parameter, and is as follows:

In vmnet-only/userif.c, around line 113, change

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
#else
    retval = get_user_pages(current, current->mm, addr,
                1, 1, 0, &page, NULL);
#endif

to

#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, 6, 0)
     retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
#else
     retval = get_user_pages(current, current->mm, addr,
                 1, 1, 0, &page, NULL);
#endif
#endif

VMware had been working OK on my system with the original version of the patch, and I have applied this new version of the patch, and it all works correctly..

Robert Gadsdon.   January 31, 2017.

 

 


Comments

VMware – Updated vmnet Patch for Kernel 4.9/4.10.. — 6 Comments

  1. You might try to trigger that by enabling USB tethering on a connected phone while VMs are running. Other scenarios I encountered involved Kubernetes cluster (non-tainted).

  2. @Plamen Dimitrov Thank you for your script! Made the process painless and easy! Also worked around a GCC issue I’ve been having. All the best!

  3. Hi, nice work, I’d just like to add the following change to vmmon as well:

    Change the following around line 1166 in linux/hostif.c:

    #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, 6, 0)
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
    #else
    retval = get_user_pages(current, current->mm, (unsigned long)uvAddr,
    numPages, 0, 0, ppages, NULL);
    #endif
    #endif

    And it will also build against 4.10!

Leave a Reply

Your email address will not be published. Required fields are marked *