Kernel – 5.14-rc1 – OK with Patched VMware, Breaks NVIDIA..
Kernel 5.14-rc1 has been released, and brief details are here: http://lkml.iu.edu/hypermail/linux/kernel/2107.1/02943.html
The latest VMware 16.1.2 patch includes a fix for 5.14-rc, and compiles and runs OK (tested with 5.14-rc1). Find it at: https://github.com/mkubecek/vmware-host-modules/tree/workstation-16.1.2
NVIDIA 470.42.01 compile failed:
………….
/home/rgadsdon/NVIDIA-Linux-x86_64-470.42.01/kernel/common/inc/nv-time.h: In function ‘nv_sleep_ms’:
/home/rgadsdon/NVIDIA-Linux-x86_64-470.42.01/kernel/common/inc/nv-time.h:217:18: error: ‘struct task_struct’ has no member named ‘state’; did you mean ‘__state’?
217 | current->state = TASK_INTERRUPTIBLE;
| ^~~~~
| __state
make[2]: *** [scripts/Makefile.build:271: /home/rgadsdon/NVIDIA-Linux-x86_64-470.42.01/kernel/nvidia/nv.o] Error 1
……………….
Bodged this by simply changing ‘state
‘ to ‘__state
‘ in line 217 of NVIDIA-Linux-x86_64-470.42.01/kernel/common/inc/nv-time.h (note that other changes may be necessary..), and then the compile failed with:
/home/rgadsdon/NVIDIA-Linux-x86_64-470.42.01/kernel/nvidia-drm/nvidia-drm-drv.c:925:14: error: ‘struct drm_device’ has no member named ‘pdev’; did you mean ‘dev’?
925 | dev->pdev = to_pci_dev(device);
| ^~~~
| dev
make[2]: *** [scripts/Makefile.build:271: /home/rgadsdon/NVIDIA-Linux-x86_64-470.42.01/kernel/nvidia-drm/nvidia-drm-drv.o] Error 1
The driver can be compiled/loaded by using the # NVIDIA-Linux-x86_64-470.42.01.run –no-drm option.. More investigation needed…
Robert Gadsdon July 11th 2021.
A cleaner solution for the first error would be set_current_state(TASK_INTERRUPTIBLE)
pdev was removed from drm_device [1] dev->pdev = to_pci_dev(device); it should be guarded to versions before 5.14.
[1] https://github.com/torvalds/linux/commit/b347e04452ff6382ace8fba9c81f5bcb63be17a6
Joan Bruguera provided a patch for the 465.31 version:
https://gist.github.com/joanbm/144a965c36fc1dc0d1f1b9be3438a368
Joan did a very fast job:
https://gist.github.com/joanbm?direction=desc&sort=updated