{"id":1838,"date":"2016-10-30T02:48:33","date_gmt":"2016-10-30T02:48:33","guid":{"rendered":"http:\/\/rglinuxtech.com\/?p=1838"},"modified":"2016-10-30T02:48:33","modified_gmt":"2016-10-30T02:48:33","slug":"kernel-4-9-rc3-nvidia-patch-still-works-and-fix-for-vmware-12-5-1","status":"publish","type":"post","link":"https:\/\/rglinuxtech.com\/?p=1838","title":{"rendered":"Kernel &#8211; 4.9-rc3 &#8211; NVIDIA Patch still works, and Fix for VMware 12.5.1?"},"content":{"rendered":"<p>Updated the test system to Kernel <strong>4.9-rc3<\/strong>, and the patch for NVIDIA mentioned in my article for -rc2 still works OK..\u00a0\u00a0\u00a0\u00a0 I Compiled <strong>370.28<\/strong> and <strong>375.10<\/strong> successfully..<\/p>\n<p>As I could not find any patches for VMware &#8211; and the latest version 12.5.1 still fails to compile, I created a <em>nasty hack<\/em> myself..<\/p>\n<p>Warning &#8211; This is not an official patch, and I am not an expert in kernel code, but I applied this to <strong><span style=\"font-family: courier new,courier;\">vmmon<\/span><\/strong> and <span style=\"font-family: courier new,courier;\"><strong>vmnet<\/strong><\/span>, and both compile OK, and load\/run, on Kernel 4.9-rc3..<\/p>\n<p>In <strong><span style=\"font-family: courier new,courier;\">vmnet-only\/userif.c<\/span><\/strong>, around line 113, change<\/p>\n<pre><strong>#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(4, 6, 0)<\/strong>\r\n<strong>    retval = get_user_pages(addr, 1, 1, 0, &amp;page, NULL);<\/strong>\r\n<strong>#else<\/strong>\r\n<strong>    retval = get_user_pages(current, current-&gt;mm, addr,<\/strong>\r\n<strong>                1, 1, 0, &amp;page, NULL);<\/strong>\r\n<strong>#endif<\/strong><\/pre>\n<p>to<\/p>\n<pre><strong>#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(4, 9, 0)<\/strong>\r\n<strong>     retval = get_user_pages(addr, 1, 0, &amp;page, NULL);<\/strong>\r\n<strong>#else<\/strong>\r\n<strong>#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(4, 6, 0)<\/strong>\r\n<strong>     retval = get_user_pages(addr, 1, 1, 0, &amp;page, NULL);<\/strong>\r\n<strong>#else<\/strong>\r\n<strong>     retval = get_user_pages(current, current-&gt;mm, addr,<\/strong>\r\n<strong>                 1, 1, 0, &amp;page, NULL);<\/strong>\r\n<strong>#endif<\/strong>\r\n<strong>#endif<\/strong><\/pre>\n<p>&#8211; and in <span style=\"font-family: courier new,courier;\"><strong>vmmon-only\/linux\/hostif.c<\/strong><\/span>, around line 1162, change<\/p>\n<pre><strong>#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(4, 6, 0)<\/strong>\r\n<strong>   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);<\/strong>\r\n<strong>#else<\/strong>\r\n<strong>   retval = get_user_pages(current, current-&gt;mm, (unsigned long)uvAddr,<\/strong>\r\n<strong>                           numPages, 0, 0, ppages, NULL);<\/strong>\r\n<strong>#endif<\/strong><\/pre>\n<p>to<\/p>\n<pre><strong>#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(4, 9, 0)<\/strong>\r\n<strong>   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, ppages, NULL);<\/strong>\r\n<strong>#else<\/strong>\r\n<strong>#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(4, 6, 0)<\/strong>\r\n<strong>   retval = get_user_pages((unsigned long)uvAddr, numPages, 0, 0, ppages, NULL);<\/strong>\r\n<strong>#else<\/strong>\r\n<strong>   retval = get_user_pages(current, current-&gt;mm, (unsigned long)uvAddr,<\/strong>\r\n<strong>                           numPages, 0, 0, ppages, NULL);<\/strong>\r\n<strong>#endif<\/strong>\r\n<strong>#endif<\/strong><\/pre>\n<p>Use at your own risk!<\/p>\n<p><em>Robert Gadsdon.\u00a0 October 29, 2016.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Updated the test system to Kernel 4.9-rc3, and the patch for NVIDIA mentioned in my article for -rc2 still works OK..\u00a0\u00a0\u00a0\u00a0 I Compiled 370.28 and 375.10 successfully.. As I could not find any patches for VMware &#8211; and the latest version 12.5.1 still fails to compile, I created a nasty hack myself.. Warning &#8211; This is not <span class=\"excerpt-dots\">&hellip;<\/span> <a class=\"more-link\" href=\"https:\/\/rglinuxtech.com\/?p=1838\"><span class=\"more-msg\">Continue reading &rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5,6,1238,11,14,15,18,25],"tags":[120,182,1472,242,1473,296,1175,1474],"class_list":["post-1838","post","type-post","status-publish","format-standard","hentry","category-compilation","category-crash-and-burn","category-fix","category-hacks","category-kernel","category-linux-2","category-nvidia","category-vmware","tag-compile","tag-hack","tag-kernel-4-9-rc3","tag-linux","tag-nvidia-370-28-375-10","tag-patch","tag-success","tag-vmware-12-5-1"],"_links":{"self":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1838"}],"version-history":[{"count":2,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1838\/revisions"}],"predecessor-version":[{"id":1840,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=\/wp\/v2\/posts\/1838\/revisions\/1840"}],"wp:attachment":[{"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rglinuxtech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}