1 2 3 Previous Next 111 Replies Latest reply on May 1, 2011 10:03 PM by Atmegas

    VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch

    Noel Expert

      UPDATE: These patches are obsoleted by Workstatioin 7.1.4, for which only a BKL-less kernel needs any patch (to vmnet).

       


       

      Attached is the patch for VMware Workstation 7.1.3 on Linux Kernel 2.6.37.  Tested against Ubuntu Natty 11.04 2.6.37-2-generic.

       

      The patch also includes the necessary change for 2.6.36, and should work with both kernels, since the 2.6.37 change is protected by a version check.  The plain 2.6.36 patch, which does not support 2.6.37 is available here.

       

      List of changes:

       

      • define VMW_HAVE_UNLOCKED_IOCTL in vmmon's driver.c as required for 2.6.36

      • the semaphore patch for 2.6.37, applied only to those modules that actually need it: vmci, vmnet, and vsock.

       

      [UPDATE: The attached patch is updated to work through 2.6.37-11]

       

      Updated to reflect Workstation 7.1.4.

        • 1. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
          birdie Master

          Thank you, Noel!

           

          I have slightly reworked my patcher to make it future-proof

           

          Download it here

          • 2. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
            Krellan Enthusiast

            Thanks for making this patch!

             

            I remember having to make a similar patch during the summer of 2009 for doing exactly the same thing, except it was for VMware Workstation 6.5.2 (and 6.5.3) and kernel 2.6.29 (and 2.6.30 and 2.6.31).

             

            When VMware 6.5.3 came out, and it worked "out of the box" on the newest kernels, I thought VMware was finally paying attention to the upstream kernel again, and that our job was done.  Now that I have a reason to use VMware Player/Workstation again on Linux, I'm pleased to find this patch already exists.  So, I don't have to roll my own once again

             

            Josh

            • 3. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
              Krellan Enthusiast

              Nice script!  I ran it, and it seemed to work OK, however a lot of errors showed up on the screen about "getcwd: unable to get current working directory" and so forth.

               

              I think the bug is this: vmware-modconfig really hates to be ran from a directory that no longer exists.

               

              In your script, "$tmpdir" is removed, but the script stays in that directory for the final run of vmware-modconfig.  Insert this line right before vmware-modconfig, should take care of it:

               

              cd "$curdir"

               

              Josh

              • 4. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                birdie Master

                Thanks for noticing that glitch, I've updated the script.

                • 5. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                  rvmps Lurker

                  Thanks a lot for the script!

                   

                  But, there is always a but, I used the script for the VMware Player and it worked perfectly... after changing the product/version detecting stuff.

                   

                  Can you make it more product agnostic?

                   

                  Thanks again!

                   

                  Raul

                  • 6. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                    birdie Master

                    Surely, just give me `vmware-installer -l` output with only VMWare Player installed.

                     

                    Friday 26 November 2010

                     

                    Here's a product agnostic version of this patcher, please, test if it works and report.

                    It also fixes troubles with Debian's/Ubuntu's sudo. Now further tinkering is required

                    • 7. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                      rvmps Lurker

                       

                      Here it is:

                       

                       

                      rvmps@lance:~$ vmware-installer -l

                      Product Name           Product Version    

                      ====================== ====================

                      vmware-player          3.1.3.324285       

                       

                       

                       

                       

                       

                      Thanks!

                       

                       

                      Raul

                       

                       

                      • 8. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                        jlward4th Novice

                        I've updated Noel's files to work with 2.6.37-6.  They are attached.  Thanks Noel!

                        • 9. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                          cmfranke Lurker

                           

                          Pretty sure I'm using the stock 7.1.3 sources to apply the above patch /w patch modules, but I was getting errors /w the patch for iommu.c (and comparing source lines to patch lines source lines aren't even close)..

                           

                           

                          Solution was to remove the iommu section of the patch file, modules compiled fine after this /w opensuse and kernel 2.6.37-rc3-git1-4-desktop

                           

                           

                             

                           

                           

                           

                           

                           

                          • 10. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                            zwierbel Novice

                             

                            Patch is does not work with 2.6.36:

                             

                             

                             

                            1. bash patch-modules_v61.sh

                            patching file vmci-only/include/compat_semaphore.h

                            patching file vmnet-only/compat_semaphore.h

                            patching file vsock-only/shared/compat_semaphore.h

                            patching file vmmon-only/linux/iommu.c

                            Hunk #1 FAILED at 153.

                            Hunk #2 FAILED at 400.

                            2 out of 2 hunks FAILED -- saving rejects to file vmmon-only/linux/iommu.c.rej

                            patching file vmmon-only/linux/driver.c

                             

                             

                            http://...

                             

                             

                               CC   /tmp/vmware-root/modules/vmmon-only/common/cpuid.o

                            make[4]: *** /tmp/vmware-root/modules/vmmon-only/linux/driver.o Error 1

                            make[4]: *** Waiting for unfinished jobs....

                            /tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_SetupMMU’:

                            /tmp/vmware-root/modules/vmmon-only/linux/iommu.c:103: warning: cast from pointer to integer of different size

                            /tmp/vmware-root/modules/vmmon-only/linux/iommu.c:113: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’

                            /tmp/vmware-root/modules/vmmon-only/linux/iommu.c:117: warning: cast to pointer from integer of different size

                            /tmp/vmware-root/modules/vmmon-only/linux/iommu.c:120: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘uint64’

                            /tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMUUnregisterDeviceInt’:

                            /tmp/vmware-root/modules/vmmon-only/linux/iommu.c:217: warning: ignoring return value of ‘device_attach’, declared with attribute warn_unused_result

                            /tmp/vmware-root/modules/vmmon-only/linux/hostif.c: In function ‘HostIFReadUptimeWork’:

                            /tmp/vmware-root/modules/vmmon-only/linux/hostif.c:2004: warning: ‘newUpBase’ may be used uninitialized in this function

                            make[3]: *** Error 2

                            make[2]: *** Error 2

                            make[1]: *** Error 2

                            make[1]: Leaving directory `/usr/src/linux-headers-2.6.36-trunk-686'

                            make: *** http://vmmon.ko Error 2

                            make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'

                            Unable to install vmmon

                             

                             

                             

                            • 11. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                              lucille21 Lurker

                              thanks for the insights.  really helpful specially for a newbie like me.

                               

                              url=http://www.ereadywebsites.comweb designer[/url]

                              url=http://www.ereadywebsites.comweb developer[/url]

                              url=http://www.ereadywebsites.comwebsite designer[/url]

                              url=http://www.ereadywebsites.comturnkey websites[/url]

                              • 12. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                                fenice Novice

                                Shame I have to follow a spammer.

                                 

                                 

                                Anyway, thanks for your work on this patch. I've recently installed the 2.6.37 kernel on my openSUSE 11.3 box and I'm having problems, I have the following kernel installed:

                                 

                                 

                                2.6.37-rc3-git1-5-desktop

                                 

                                 

                                 

                                The patch applies OK and without errrors and when I do the following I get an error with vmmon:

                                 

                                vmware-modconfig --console --install-allStopping VMware services:

                                VMware USB Arbitrator                                               done

                                VM communication interface socket family                            done

                                Virtual machine communication interface                             done

                                Virtual machine monitor                                             done

                                Blocking file system                                                done

                                Using 2.6.x kernel build system.

                                make: Entering directory `/tmp/vmware-root/modules/vmmon-only'

                                make -C /lib/modules/2.6.37-rc3-git1-5-desktop/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

                                MODULEBUILDDIR= modules

                                make[1]: Entering directory `/usr/src/linux-2.6.37-rc3-git1-5-obj/x86_64/desktop'

                                make -C ../../../linux-2.6.37-rc3-git1-5 O=/usr/src/linux-2.6.37-rc3-git1-5-obj/x86_64/desktop/. modules

                                CC   /tmp/vmware-root/modules/vmmon-only/linux/driver.o

                                /tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:

                                /tmp/vmware-root/modules/vmmon-only/linux/driver.c:1737:7: error: implicit declaration of function ‘kernel_locked’

                                make[4]: *** /tmp/vmware-root/modules/vmmon-only/linux/driver.o Error 1

                                make[3]: *** Error 2

                                make[2]: *** Error 2

                                make[1]: *** Error 2

                                make[1]: Leaving directory `/usr/src/linux-2.6.37-rc3-git1-5-obj/x86_64/desktop'

                                make: *** http://vmmon.ko Error 2

                                make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'

                                Unable to install vmmon

                                 

                                Is there anything else you need and is it fixable?

                                • 13. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                                  jlward4th Novice

                                  My patch should have fixed that.  Here is the driver.c patch:

                                  diff -ru original/vmmon-only/linux/driver.c patched/vmmon-only/linux/driver.c 
                                  --- original/vmmon-only/linux/driver.c  2010-11-11 13:37:22.000000000 -0700
                                  +++ patched/vmmon-only/linux/driver.c   2010-11-24 12:05:48.924489002 -0700
                                  @@ -145,7 +145,7 @@
                                   #endif
                                   #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
                                       (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
                                  -#  define kernel_locked_by_current() kernel_locked()
                                  +#  define kernel_locked_by_current() (current->lock_depth >= 0)
                                   #else
                                   #  define kernel_locked_by_current() 0
                                   #endif
                                  @@ -170,6 +170,7 @@
                                   static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
                                                              u_int iocmd, unsigned long ioarg);
                                   #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
                                  +#define VMW_HAVE_UNLOCKED_IOCTL
                                   static long LinuxDriver_UnlockedIoctl(struct file *filp,
                                                              u_int iocmd, unsigned long ioarg);
                                   #endif
                                  

                                   

                                  • 14. Re: VMware Workstation 7.1.3 Linux kernel 2.6.37 (and 2.6.36) patch
                                    fenice Novice

                                    Hi

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                    Thanks for your prompt reply. OK, first thing - the error I encountered was PEBKAC. I had the  file 'patch-modules_v61.sh' in the directory with the correct ...37-6.generic.patch file but for some strange reason it referenced the old ...37-2.generic.patch which was in the same directory. Downloading it again and applying  the correct patch worked fine with the exception that it now gives the same iommu error mentioned by zwierbel

                                     

                                     

                                     

                                     

                                    patching file vmci-only/include/compat_semaphore.h

                                    patching file vmnet-only/compat_semaphore.h

                                    patching file vsock-only/shared/compat_semaphore.h

                                    patching file vmmon-only/linux/iommu.c

                                    Hunk #1 FAILED at 153.

                                    Hunk #2 FAILED at 400.

                                    2 out of 2 hunks FAILED -- saving rejects to file vmmon-only/linux/iommu.c.rej

                                    patching file vmmon-only/linux/driver.c

                                     

                                     

                                     

                                     

                                    Commenting out that section of the patch file worked for me and Workstation is now running fine. Once again, many thanks for your patch for this problem.

                                    1 2 3 Previous Next