KERNEL – 4.10-rc1 Out – OK with VMware, Breaks NVIDIA..

Kernel 4.10-rc1 is out, and brief details are here: http://lkml.iu.edu/hypermail/linux/kernel/1612.3/00220.html

Installed it on the test system, and (4.9-patched) VMware 12.5.2 is OK, but the latest NVIDIA driver (375.26) fails to compile:

....................
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/common/inc/nv-mm.h: In function ‘NV_GET_USER_PAGES_REMOTE’:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/common/inc/nv-mm.h:86:20: error: too few arguments to function ‘get_user_pages_remote’
 return get_user_pages_remote(tsk, mm, start, nr_pages, flags, pages, vmas);
 ^~~~~~~~~~~~~~~~~~~~~
....................

There was already a patch to fix this, and details are at: https://devtalk.nvidia.com/default/topic/982667/linux/heads-up-375-26-build-breaks-after-recent-commits-to-kernel/post/5043956/#5043956

I applied this, but got more errors:

$ cat nv-410rc1_patch.patch |patch -p0
patching file a/kernel/common/inc/nv-mm.h
patching file a/kernel/nvidia/nv-p2p.c
patching file a/kernel/nvidia-drm/nvidia-drm-fence.c
patching file a/kernel/nvidia-drm/nvidia-drm-gem.h
patching file a/kernel/nvidia-drm/nvidia-drm-modeset.c
patching file a/kernel/nvidia-drm/nvidia-drm-priv.h
patching file a/kernel/nvidia-uvm/uvm8.c
patching file a/kernel/nvidia-uvm/uvm8_test.c
patching file a/kernel/nvidia-uvm/uvm_lite.c
Hunk #1 succeeded at 1333 with fuzz 2.
....................................
 << Compile.. >>
....................................
 CONFTEST: drm_atomic_available
 CONFTEST: drm_atomic_modeset_nonblocking_commit_available
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-frontend.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-instance.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-acpi.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-chrdev.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-cray.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-dma.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-gvi.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-i2c.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-mempool.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-mmap.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-p2p.o
 CC [M] /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.o
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c: In function ‘nvidia_cpu_callback’:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c:213:14: error: ‘CPU_DOWN_FAILED’ undeclared (first use in this function)
 case CPU_DOWN_FAILED:
 ^~~~~~~~~~~~~~~
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c:213:14: note: each undeclared identifier is reported only once for each function it appears in
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c:220:14: error: ‘CPU_DOWN_PREPARE’ undeclared (first use in this function)
 case CPU_DOWN_PREPARE:
 ^~~~~~~~~~~~~~~~
In file included from /home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c:15:0:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c: In function ‘nv_init_pat_support’:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/common/inc/nv-linux.h:391:34: error: implicit declaration of function ‘register_cpu_notifier’ [-Werror=implicit-function-declaration]
 #define register_hotcpu_notifier register_cpu_notifier
 ^
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c:258:17: note: in expansion of macro ‘register_hotcpu_notifier’
 if (register_hotcpu_notifier(&nv_hotcpu_nfb) != 0)
 ^~~~~~~~~~~~~~~~~~~~~~~~
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c: In function ‘nv_teardown_pat_support’:
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/common/inc/nv-linux.h:388:36: error: implicit declaration of function ‘unregister_cpu_notifier’ [-Werror=implicit-function-declaration]
 #define unregister_hotcpu_notifier unregister_cpu_notifier
 ^
/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.c:283:9: note: in expansion of macro ‘unregister_hotcpu_notifier’
 unregister_hotcpu_notifier(&nv_hotcpu_nfb);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
/usr/src/linux-4.10-rc1/scripts/Makefile.build:293: recipe for target '/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.o' failed
make[3]: *** [/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel/nvidia/nv-pat.o] Error 1
/usr/src/linux-4.10-rc1/Makefile:1490: recipe for target '_module_/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel' failed
make[2]: *** [_module_/home/rgadsdon/kernel/NVIDIA-Linux-x86_64-375.26/kernel] Error 2
make[2]: Leaving directory '/usr/src/linux-4.10-rc1'
Makefile:150: recipe for target 'sub-make' failed
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.10-rc1'
Makefile:81: recipe for target 'modules' failed
make: *** [modules] Error 2

It may be that more Kernel code changes were incorporated after the patch was created, and before 4.10-rc1 was released?

I have just encountered a potentially more serious problem with compiling this kernel on ARM64 (aarch64) systems, but need more tests to confirm this, and will post results in a later article..

Robert Gadsdon.  December 26, 2016.

 


Comments

KERNEL – 4.10-rc1 Out – OK with VMware, Breaks NVIDIA.. — 9 Comments

  1. Robert, are you sure VMware 12.5.2 works – is it possible you had a hacked/fixed vmnet.tar and vmmon.tar file already on the filesystem? I have a fresh Xubuntu install with 4.10rc1 loaded and I seem to be getting the same error as discussed in your previous blog posts. I’m about to patch the tar’s and I’ll report back with more details then.

    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-z6n6fJ/vmmon-only’
    Using kernel build system.
    /usr/bin/make -C /lib/modules/4.10.0-041000rc1-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.10.0-041000rc1-generic’
    CC [M] /tmp/modconfig-z6n6fJ/vmmon-only/linux/driver.o
    CC [M] /tmp/modconfig-z6n6fJ/vmmon-only/linux/driverLog.o
    CC [M] /tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.o
    /tmp/modconfig-z6n6fJ/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-z6n6fJ/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
    /tmp/modconfig-z6n6fJ/vmmon-only/linux/driver.c:1981:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
    }
    ^
    CC [M] /tmp/modconfig-z6n6fJ/vmmon-only/common/memtrack.o
    CC [M] /tmp/modconfig-z6n6fJ/vmmon-only/common/apic.o
    /tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.c: In function ‘HostIFGetUserPages’:
    /tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.c:1166:67: error: passing argument 5 of ‘get_user_pages’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
    ^~~~~~
    In file included from /tmp/modconfig-z6n6fJ/vmmon-only/./include/compat_page.h:23:0,
    from /tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.c:32:
    ./include/linux/mm.h:1271:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    /tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.c:1166:13: error: too many arguments to function ‘get_user_pages’
    retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);
    ^~~~~~~~~~~~~~
    In file included from /tmp/modconfig-z6n6fJ/vmmon-only/./include/compat_page.h:23:0,
    from /tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.c:32:
    ./include/linux/mm.h:1271:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    scripts/Makefile.build:293: recipe for target ‘/tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.o’ failed
    make[2]: *** [/tmp/modconfig-z6n6fJ/vmmon-only/linux/hostif.o] Error 1
    make[2]: *** Waiting for unfinished jobs….
    Makefile:1496: recipe for target ‘_module_/tmp/modconfig-z6n6fJ/vmmon-only’ failed
    make[1]: *** [_module_/tmp/modconfig-z6n6fJ/vmmon-only] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.10.0-041000rc1-generic’
    Makefile:120: recipe for target ‘vmmon.ko’ failed
    make: *** [vmmon.ko] Error 2
    make: Leaving directory ‘/tmp/modconfig-z6n6fJ/vmmon-only’
    make: Entering directory ‘/tmp/modconfig-z6n6fJ/vmnet-only’
    Using kernel build system.
    /usr/bin/make -C /lib/modules/4.10.0-041000rc1-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory ‘/usr/src/linux-headers-4.10.0-041000rc1-generic’
    CC [M] /tmp/modconfig-z6n6fJ/vmnet-only/hub.o
    CC [M] /tmp/modconfig-z6n6fJ/vmnet-only/driver.o
    CC [M] /tmp/modconfig-z6n6fJ/vmnet-only/userif.o
    CC [M] /tmp/modconfig-z6n6fJ/vmnet-only/netif.o
    /tmp/modconfig-z6n6fJ/vmnet-only/userif.c: In function ‘UserifLockPage’:
    /tmp/modconfig-z6n6fJ/vmnet-only/userif.c:117:43: error: passing argument 5 of ‘get_user_pages’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
    ^
    In file included from ./include/linux/highmem.h:7:0,
    from /tmp/modconfig-z6n6fJ/vmnet-only/userif.c:26:
    ./include/linux/mm.h:1271:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    /tmp/modconfig-z6n6fJ/vmnet-only/userif.c:117:13: error: too many arguments to function ‘get_user_pages’
    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);
    ^~~~~~~~~~~~~~
    In file included from ./include/linux/highmem.h:7:0,
    from /tmp/modconfig-z6n6fJ/vmnet-only/userif.c:26:
    ./include/linux/mm.h:1271:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
    ^~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    scripts/Makefile.build:293: recipe for target ‘/tmp/modconfig-z6n6fJ/vmnet-only/userif.o’ failed
    make[2]: *** [/tmp/modconfig-z6n6fJ/vmnet-only/userif.o] Error 1
    make[2]: *** Waiting for unfinished jobs….
    In file included from ./include/linux/pci.h:35:0,
    from /tmp/modconfig-z6n6fJ/vmnet-only/compat_netdevice.h:27,
    from /tmp/modconfig-z6n6fJ/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-z6n6fJ/vmnet-only/net.h:38:0,
    from /tmp/modconfig-z6n6fJ/vmnet-only/vnetInt.h:26,
    from /tmp/modconfig-z6n6fJ/vmnet-only/netif.c:42:
    /tmp/modconfig-z6n6fJ/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-z6n6fJ/vmnet-only/compat_netdevice.h:27,
    from /tmp/modconfig-z6n6fJ/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-z6n6fJ/vmnet-only/net.h:38:0,
    from /tmp/modconfig-z6n6fJ/vmnet-only/vnetInt.h:26,
    from /tmp/modconfig-z6n6fJ/vmnet-only/netif.c:42:
    /tmp/modconfig-z6n6fJ/vmnet-only/vm_device_version.h:73:0: note: this is the location of the previous definition
    #define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07B0

    Makefile:1496: recipe for target ‘_module_/tmp/modconfig-z6n6fJ/vmnet-only’ failed
    make[1]: *** [_module_/tmp/modconfig-z6n6fJ/vmnet-only] Error 2
    make[1]: Leaving directory ‘/usr/src/linux-headers-4.10.0-041000rc1-generic’
    Makefile:120: recipe for target ‘vmnet.ko’ failed
    make: *** [vmnet.ko] Error 2
    make: Leaving directory ‘/tmp/modconfig-z6n6fJ/vmnet-only’
    Starting VMware services:
    Virtual machine monitor failed
    Virtual machine communication interface done
    VM communication interface socket family done
    Blocking file system done
    Virtual ethernet failed
    VMware Authentication Daemon done
    ^C
    adam@BC-LINPC-02:~/src/sync-engine$ vmware –version
    VMware Workstation 12.5.2 build-4638234

  2. Sorry should have included these last two lines of my terminal buffer in my last comment, too:

    adam@BC-LINPC-02:~/src/sync-engine$ uname -a
    Linux BC-LINPC-02 4.10.0-041000rc1-generic #201612252031 SMP Mon Dec 26 01:33:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

  3. Sorry for the abundance of comments. I would like to confirm that VMWare 12.5.2 on the 4.10rc1 kernel DOES still require patching as these instructions provide:

    http://rglinuxtech.com/?p=1838

    (See comments for a more detailed/expanded set of instructions on installation process)

    • Anyways, quick and dirty fix is to just undefine NV_ENABLE_HOTPLUG_CPU, almost nobody uses that on desktop anyway.

Leave a Reply

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