Kernel – 4.20-rc3 Released, OK with latest VMware, Still no NVIDIA Fix..
Kernel 4.20-rc3 is out, and brief details are here: http://lkml.iu.edu/hypermail/linux/kernel/1811.2/01363.html
VMware 15.0.1 is still OK, but there is still no solution for NVIDIA. I posted details of my testing to the NVIDIA Forum over a week ago, but there has been no response, so far..
Robert Gadsdon. November 18, 2018.
The NVIDIA issue seems to be related to the Mali drivers issue I’m having on ARM systems.
It seems that the transition from vm_insert_pfn to vmf_insert_pfn was done through at least 2 kernel versions (4.18 and 4.19) and they all involved changing the signature of the function set to the .fault field of the local struct vm_operations_struct structure.
The signature changes from … int my_driver_cpu_vm_fault to vmfault_t my_driver_cpu_vm_fault and uses vmf_insert_pfn here as the return value of the function.
However, in most driver cases, the cpu_vm_fault is a very simple function :
https://lore.kernel.org/patchwork/patch/904502/
https://gitlab.freedesktop.org/seanpaul/dpu-staging/commit/a5f74ec7d3cb6278255f7bf2ffb28baa6ad6e157
Anyway, vmf_insert_pfn have been introduced like this :
https://gitlab.freedesktop.org/seanpaul/dpu-staging/commit/1c8f422059ae5da07db7406ab916203f9417e396
The simple (but semi broken) way I found to solve this issue is to replace the .fault function signature accordingly, and then use a vmfault_t identifier to store the result of the vmf_insert_pfn function and break only if it’s equal to “VM_FAULT_NOPAGE”…
https://raw.githubusercontent.com/Miouyouyou/RockMyy/632e0cd91bb89c5c6ce6925853ca7696cb1b5b5e/patches/Midgard/r19p0-01rel0/0012-Temporary-patch-for-the-Mali-issues.patch
Now, that behaviour in my patch is stupid since vmf_insert_pfn *always* return a VM_FAULT error. There’s no other return paths : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/memory.c#n1523
However, I don’t know why the Mali driver is calling this function outside fault functions. I’m still trying to search for another driver that mimics this mechanism.
That said, it still made the Mali drivers able to boot semi properly and provide OpenGL ES output, with degraded performances.
Maybe those informations could help you in trying to patch the NVIDIA kernel drivers.
Thanks for the detailed summary.. I would strongly recommend posting this on the NVIDIA dev forum, if you haven’t already done so, as this is where the people with the necessary skills will read it…
RG.
Nvidia 415.18 released today. Does it fix the problem with kernel 4.20?
Just tested it, and no change from the previous version..
I still haven’t got any response to my post on the dev forum, either..
RG.