Comments

Kernel – 4.11-rc1 Released – Breaks (Patched) VMware and NVIDIA.. — 7 Comments

  1. The following patches seem to fix VMWare for me. Judging by the error message, adding “#include ” might also work for nVidia.

    Vmnet:

    diff -ur old/vmnet-only/linux/userif.c vmnet-only/linux/userif.c
    — old/vmnet-only/userif.c 2016-11-16 16:23:41.000000000 +0200
    +++ vmnet-only/userif.c 2017-03-06 10:32:33.106432185 +0200
    @@ -36,6 +36,7 @@
    #include
    #include
    #include
    +#include

    #include
    #include

    Vmmon:

    diff -ur old/vmmon-only/linux/driver.c vmmon-only/linux/driver.c
    — old/vmmon-only/linux/driver.c 2016-11-12 09:15:52.000000000 +0200
    +++ vmmon-only/linux/driver.c 2017-03-06 10:46:33.347053458 +0200
    @@ -105,7 +105,7 @@
    static int LinuxDriver_Close(struct inode *inode, struct file *filp);
    static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait);
    #if defined(VMW_NOPAGE_2624)
    -static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault);
    +static int LinuxDriverFault(struct vm_fault *fault);
    #else
    static struct page *LinuxDriverNoPage(struct vm_area_struct *vma,
    unsigned long address,
    @@ -882,15 +882,14 @@
    */

    #if defined(VMW_NOPAGE_2624)
    -static int LinuxDriverFault(struct vm_area_struct *vma, //IN
    – struct vm_fault *fault) //IN/OUT
    +static int LinuxDriverFault(struct vm_fault *fault) //IN/OUT
    #else
    static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN
    unsigned long address, //IN
    int *type) //OUT: Fault type
    #endif
    {
    – VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data;
    + VMLinux *vmLinux = (VMLinux *) fault->vma->vm_file->private_data;
    unsigned long pg;
    struct page* page;

    diff -ur old/vmmon-only/linux/hostif.c vmmon-only/linux/hostif.c
    — old/vmmon-only/linux/hostif.c 2016-11-16 16:24:13.000000000 +0200
    +++ vmmon-only/linux/hostif.c 2017-03-06 10:36:14.430428787 +0200
    @@ -37,6 +37,7 @@

    #include
    #include
    +#include

    #include
    #include

    • I think i have the same problem. It here

      Stopping VMware services:
      VMware Authentication Daemon done
      VM communication interface socket family done
      Virtual machine communication interface done
      Virtual machine monitor done
      Blocking file system done
      make: Entering directory ‘/tmp/modconfig-VjDerT/vmmon-only’
      Using kernel build system.
      /sbin/make -C /lib/modules/4.11.2-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= modules
      make[1]: Entering directory ‘/usr/lib/modules/4.11.2-1-ARCH/build’
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/linux/driverLog.o
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/linux/driver.o
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.o
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/common/memtrack.o
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/common/apic.o
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/common/hashFunc.o
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/common/vmx86.o
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/common/cpuid.o
      /tmp/modconfig-VjDerT/vmmon-only/linux/driver.c:121:19: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
      .fault = LinuxDriverFault
      ^~~~~~~~~~~~~~~~
      /tmp/modconfig-VjDerT/vmmon-only/linux/driver.c:121:19: note: (near initialization for ‘vmuser_mops.fault’)
      /tmp/modconfig-VjDerT/vmmon-only/linux/driver.c:1283:1: warning: always_inline function might not be inlinable [-Wattributes]
      LinuxDriverSyncReadTSCs(uint64 *delta) // OUT: TSC max – TSC min
      ^~~~~~~~~~~~~~~~~~~~~~~
      /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c: In function ‘HostIFFastClockThread’:
      /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c:3264:4: error: implicit declaration of function ‘allow_signal’ [-Werror=implicit-function-declaration]
      allow_signal(SIGKILL);
      ^~~~~~~~~~~~
      /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c: In function ‘HostIF_SetFastClockRate’:
      /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c:3418:10: error: implicit declaration of function ‘force_sig’ [-Werror=implicit-function-declaration]
      force_sig(SIGKILL, linuxState.fastClockThread);
      ^~~~~~~~~
      CC [M] /tmp/modconfig-VjDerT/vmmon-only/common/task.o
      cc1: some warnings being treated as errors
      make[2]: *** [scripts/Makefile.build:294: /tmp/modconfig-VjDerT/vmmon-only/linux/driver.o] Error 1
      make[2]: *** Waiting for unfinished jobs….
      cc1: some warnings being treated as errors
      make[2]: *** [scripts/Makefile.build:294: /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.o] Error 1
      /tmp/modconfig-VjDerT/vmmon-only/common/task.o: warning: objtool: .text: unexpected end of section
      make[1]: *** [Makefile:1492: _module_/tmp/modconfig-VjDerT/vmmon-only] Error 2
      make[1]: Leaving directory ‘/usr/lib/modules/4.11.2-1-ARCH/build’
      make: *** [Makefile:120: vmmon.ko] Error 2
      make: Leaving directory ‘/tmp/modconfig-VjDerT/vmmon-only’
      make: Entering directory ‘/tmp/modconfig-VjDerT/vmnet-only’
      Using kernel build system.
      /sbin/make -C /lib/modules/4.11.2-1-ARCH/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
      MODULEBUILDDIR= modules
      make[1]: Entering directory ‘/usr/lib/modules/4.11.2-1-ARCH/build’
      CC [M] /tmp/modconfig-VjDerT/vmnet-only/driver.o
      CC [M] /tmp/modconfig-VjDerT/vmnet-only/hub.o
      CC [M] /tmp/modconfig-VjDerT/vmnet-only/userif.o
      CC [M] /tmp/modconfig-VjDerT/vmnet-only/netif.o
      /tmp/modconfig-VjDerT/vmnet-only/userif.c: In function ‘VNetUserIfRead’:
      /tmp/modconfig-VjDerT/vmnet-only/userif.c:745:11: error: implicit declaration of function ‘signal_pending’ [-Werror=implicit-function-declaration]
      if (signal_pending(current)) {
      ^~~~~~~~~~~~~~
      In file included from ./include/linux/pci.h:35:0,
      from /tmp/modconfig-VjDerT/vmnet-only/compat_netdevice.h:27,
      from /tmp/modconfig-VjDerT/vmnet-only/netif.c:43:
      ./include/linux/pci_ids.h:2255:0: warning: “PCI_VENDOR_ID_VMWARE” redefined
      #define PCI_VENDOR_ID_VMWARE 0x15ad

      In file included from /tmp/modconfig-VjDerT/vmnet-only/net.h:38:0,
      from /tmp/modconfig-VjDerT/vmnet-only/vnetInt.h:26,
      from /tmp/modconfig-VjDerT/vmnet-only/netif.c:42:
      /tmp/modconfig-VjDerT/vmnet-only/vm_device_version.h:56:0: note: this is the location of the previous definition
      #define PCI_VENDOR_ID_VMWARE 0x15AD

      In file included from ./include/linux/pci.h:35:0,
      from /tmp/modconfig-VjDerT/vmnet-only/compat_netdevice.h:27,
      from /tmp/modconfig-VjDerT/vmnet-only/netif.c:43:
      ./include/linux/pci_ids.h:2256:0: warning: “PCI_DEVICE_ID_VMWARE_VMXNET3” redefined
      #define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07b0

      In file included from /tmp/modconfig-VjDerT/vmnet-only/net.h:38:0,
      from /tmp/modconfig-VjDerT/vmnet-only/vnetInt.h:26,
      from /tmp/modconfig-VjDerT/vmnet-only/netif.c:42:
      /tmp/modconfig-VjDerT/vmnet-only/vm_device_version.h:73:0: note: this is the location of the previous definition
      #define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07B0

      CC [M] /tmp/modconfig-VjDerT/vmnet-only/bridge.o
      CC [M] /tmp/modconfig-VjDerT/vmnet-only/procfs.o
      cc1: some warnings being treated as errors
      make[2]: *** [scripts/Makefile.build:294: /tmp/modconfig-VjDerT/vmnet-only/userif.o] Error 1
      make[2]: *** Waiting for unfinished jobs….
      In file included from /tmp/modconfig-VjDerT/vmnet-only/net.h:38:0,
      from /tmp/modconfig-VjDerT/vmnet-only/vnetInt.h:26,
      from /tmp/modconfig-VjDerT/vmnet-only/bridge.c:52:
      /tmp/modconfig-VjDerT/vmnet-only/vm_device_version.h:56:0: warning: “PCI_VENDOR_ID_VMWARE” redefined
      #define PCI_VENDOR_ID_VMWARE 0x15AD

      In file included from ./include/linux/pci.h:35:0,
      from /tmp/modconfig-VjDerT/vmnet-only/compat_netdevice.h:27,
      from /tmp/modconfig-VjDerT/vmnet-only/bridge.c:51:
      ./include/linux/pci_ids.h:2255:0: note: this is the location of the previous definition
      #define PCI_VENDOR_ID_VMWARE 0x15ad

      In file included from /tmp/modconfig-VjDerT/vmnet-only/net.h:38:0,
      from /tmp/modconfig-VjDerT/vmnet-only/vnetInt.h:26,
      from /tmp/modconfig-VjDerT/vmnet-only/bridge.c:52:
      /tmp/modconfig-VjDerT/vmnet-only/vm_device_version.h:73:0: warning: “PCI_DEVICE_ID_VMWARE_VMXNET3” redefined
      #define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07B0

      In file included from ./include/linux/pci.h:35:0,
      from /tmp/modconfig-VjDerT/vmnet-only/compat_netdevice.h:27,
      from /tmp/modconfig-VjDerT/vmnet-only/bridge.c:51:
      ./include/linux/pci_ids.h:2256:0: note: this is the location of the previous definition
      #define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07b0

      make[1]: *** [Makefile:1492: _module_/tmp/modconfig-VjDerT/vmnet-only] Error 2
      make[1]: Leaving directory ‘/usr/lib/modules/4.11.2-1-ARCH/build’
      make: *** [Makefile:120: vmnet.ko] Error 2
      make: Leaving directory ‘/tmp/modconfig-VjDerT/vmnet-only’
      Unable to install all modules. See log for details.

      Can you please give me two files back. Or any solution to my problem
      Thanks.

      • I also had this problem with implicit function declarations…

        /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c: In function ‘HostIFFastClockThread’:
        /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c:3264:4: error: implicit declaration of function ‘allow_signal’ [-Werror=implicit-function-declaration]
        allow_signal(SIGKILL);
        ^~~~~~~~~~~~
        /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c: In function ‘HostIF_SetFastClockRate’:
        /tmp/modconfig-VjDerT/vmmon-only/linux/hostif.c:3418:10: error: implicit declaration of function ‘force_sig’ [-Werror=implicit-function-declaration]
        force_sig(SIGKILL, linuxState.fastClockThread);

        Not to be deterred (what’s the worst that can happen – vmware didn’t work anyway) I just commented out the 2 implicit function declarations, recompiled the modules and hey presto – vmware is up and running again…

        As per your compilation errors, inside vmmon-only/linux/hostif.c at line numbers 3264 and 3418, just comment out the lines

        /* line3264 allow_signal(SIGKILL); */

        /* line3418 force_sig(SIGKILL, linuxState.fastClockThread); */

        recompile (sudo vmware-modconfig –console –install-all) and you shouldn’t have these errors anymore…

        Good luck.

  2. I was having trouble… And yes! your patch fixed my problem with vmware-patch on Arch Linux 4.11.2-1 with Nvidia and VMware 12.1.0. Thanks loads!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.