New kernel (2.6.36), new patch to apply to VMware Workstation 7.1

The problem:

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
make -C /lib/modules/2.6.36/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux'
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function 'init_module':
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:425: error: 'struct file_operations' has no member named 'ioctl'
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon

The resolution:

--- driver.c.orig 2010-09-21 10:14:54.000000000 +0200
+++ driver.c 2010-10-22 14:54:44.820299199 +0200
@@ -143,6 +143,9 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 24)
#define VMW_NOPAGE_2624
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
+#define VMW_HAVE_UNLOCKED_IOCTL
+#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
(defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
# define kernel_locked_by_current() kernel_locked()

To apply the patch, follow the instructions in the previous article. And you'll also have to apply the vsock patch from there, because that incompatibility still hasn't been fixed. It might apply with the offset of 9 lines, but you need not worry about that, it's OK.

Actually, to make things easier for ya all (time is money, right?) I'm attaching both patches right here (look below), adapted to apply cleanly to the VMware Workstation 7.1.2 files.

Have fun, and let me know if it works OK for you!

AttachmentSize
vsock-2.6.36.patch3.61 KB
vmmon-2.6.36.patch465 bytes

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

vmware blog - vmmon-2.6.36 patch

It worked for me. I am using VMWare Player 3.1.3 on Ubuntu 10.10 with kernel 2.6.36. Thank you for this blog and James Tan's instructions.

2.6.37 fail

VMWare 3.1.3 debian 2.6.37 x86_64 failed x_X

# make
Using 2.6.x kernel build system.
make -C /lib/modules/2.6.37/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-2.6.37'
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘init_module’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:425: error: ‘struct file_operations’ has no member named ‘ioctl’
/tmp/vmware-root/modules/vmmon-only/linux/driver.c: In function ‘LinuxDriver_Ioctl’:
/tmp/vmware-root/modules/vmmon-only/linux/driver.c:1736: error: implicit declaration of function ‘kernel_locked’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37'
make: *** [vmmon.ko] Error 2

i applied this patch...

# make
Using 2.6.x kernel build system.
make -C /lib/modules/2.6.37/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-2.6.37'
CC [M] /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:1739: error: implicit declaration of function ‘kernel_locked’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37'
make: *** [vmmon.ko] Error 2

argh... poor /me... :"D
any idea? :)

Enable CONFIG_BKL=y,

Enable CONFIG_BKL=y, recompile kernel, then try building modules again.

worx

VMWare 3.1.3 debian 2.6.36.2 x86_64

thankyou!

More help...

I'm sorry but it's not working...

noel@voiceitmain:/usr/lib/vmware/modules/source/vsock-only/linux$ sudo patch -p0 < /home/noel/Downloads/vsock-2.6.36.patch
[sudo] password for noel:
patching file af_vsock.c
Hunk #1 FAILED at 3230.
Hunk #2 FAILED at 3253.
Hunk #3 FAILED at 3265.
Hunk #4 FAILED at 3325.
Hunk #5 FAILED at 3341.
Hunk #6 FAILED at 3375.
Hunk #7 FAILED at 3473.
Hunk #8 FAILED at 4113.
Hunk #9 FAILED at 4150.
Hunk #10 FAILED at 4203.
Hunk #11 FAILED at 4437.
Hunk #12 FAILED at 4477.
Hunk #13 FAILED at 4543.
13 out of 13 hunks FAILED -- saving rejects to file af_vsock.c.rej

What is wrong?

If you're using Workstation

If you're using Workstation 7.1.3 you only need to apply vmmon-2.36.6.patch, VMware fixed vsock stuff in the meantime.

Thank you!

Updated my kernel yesterday and this morning - no VMWARE on my Arch Linux box. Pain in the butt.

Thanks for the fix.

It works perfectly

I am running openSuSE 11.3 - kernel 2.6.36.93, just upgraded VM Workstation to 7.1.3, and had to compile the modules.

With this version, the vsocks patch is no longer needed, as the code has been fixed by vmware, and released with this version.

another patch that patched iommu.c (calls to iommu_map, and iommu_unmap) is also no longer needed, iommu.c comes patched with this release.

The vmmon-2.36.6.patch is still needed.

Thanks

only vmmon-2.36.6.patch required - 2.6.36

Agreed with earlier Anonymous poster, only vmmon-2.36.6.patch required for kernel 2.6.36. Else there would be error during module compilation when vmware starts.

cd /usr/lib/vmware/modules/source
sudo cp -a vmmon.tar vmmon-orig.tar
sudo tar xvf vmmon.tar
cd vmmon-only/linux/
sudo patch -p0 < /tmp/vmmon-2.6.36.patch
cd ../..
sudo tar -cf vmmon.tar vmmon-only
sudo rm -Rf vmmon-only/

Thanks,
James Tan

Yes! 7.1.3 build-324285 on

Yes!
7.1.3 build-324285 on Ubuntu 10.10 with 2.6.36-020636-generic
I applied only vmmon-2.6.36.patch
It's working now

thanks!

It Works

I'm running Sidux (now aptosid)
2.6.36-0.slh.1-aptosid-686
previous kernel releases I was failing on the vsock...passed everything else...Everytime I restarted workstation i had to compile modules. Then when I did a dist-upgrade the other day it was failing on the first module 'vmmon' an not moving any further down the line of modules.

I ran your patches and Voila!! everything back to normal. All modules are built... thanks for the help

bagus

yeah........ linux is the future operating system, so keep in life by upgrading every time..

does not working for me

hi,

i applied the 2 patches, but it works not for me.

my kernel:

Linux ach 2.6.36-020636-generic #201010210905 SMP Thu Oct 21 09:08:58 UTC 2010 x86_64 GNU/Linux

workstation package:

VMware-Workstation-Full-7.1.2-301548.x86_64.bundle

what i have done:

root@ach:/usr/src# cd /usr/lib/vmware/modules/source/
root@ach:/usr/lib/vmware/modules/source# cp -a vsock.tar vsock-orig.tar
root@ach:/usr/lib/vmware/modules/source# tar xf vsock.tar
root@ach:/usr/lib/vmware/modules/source# cd vsock-only/linux
root@ach:/usr/lib/vmware/modules/source/vsock-only/linux# wget http://www.linuxinsight.com/files/vsock-2.6.36.patch
--2010-10-23 14:20:11-- http://www.linuxinsight.com/files/vsock-2.6.36.patch
Resolving www.linuxinsight.com... 67.202.106.122
Connecting to www.linuxinsight.com|67.202.106.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3695 (3.6K) [application/octet-stream]
Saving to: `vsock-2.6.36.patch'

100%[====================================================>] 3,695 12.7K/s in 0.3s

2010-10-23 14:20:13 (12.7 KB/s) - `vsock-2.6.36.patch' saved [3695/3695]

root@ach:/usr/lib/vmware/modules/source/vsock-only/linux# patch -p0 < vsock-2.6.36.patch
patching file af_vsock.c
root@ach:/usr/lib/vmware/modules/source/vsock-only/linux# cd ../..
root@ach:/usr/lib/vmware/modules/source# tar cf vsock.tar vsock-only
root@ach:/usr/lib/vmware/modules/source# rm -rf vsock-only
root@ach:/usr/lib/vmware/modules/source# cd /usr/lib/vmware/modules/source
root@ach:/usr/lib/vmware/modules/source# cp -a vmmon.tar vmmon-orig.tar
root@ach:/usr/lib/vmware/modules/source# tar xf vmmon.tar
root@ach:/usr/lib/vmware/modules/source# cd vm
vmblock.tar vmci.tar vmmon-only/ vmmon-orig.tar vmmon.tar vmnet.tar
root@ach:/usr/lib/vmware/modules/source# cd vmmon-only/linux/
root@ach:/usr/lib/vmware/modules/source/vmmon-only/linux# wget http://www.linuxinsight.com/files/vmmon-2.6.36.patch
--2010-10-23 14:22:58-- http://www.linuxinsight.com/files/vmmon-2.6.36.patch
Resolving www.linuxinsight.com... 67.202.106.122
Connecting to www.linuxinsight.com|67.202.106.122|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 465 [application/octet-stream]
Saving to: `vmmon-2.6.36.patch'

100%[====================================================>] 465 --.-K/s in 0.005s

2010-10-23 14:22:58 (94.0 KB/s) - `vmmon-2.6.36.patch' saved [465/465]

root@ach:/usr/lib/vmware/modules/source/vmmon-only/linux# patch -p0 < vmmon-2.6.36.patch
patching file driver.c
root@ach:/usr/lib/vmware/modules/source/vmmon-only/linux# cd ../..
root@ach:/usr/lib/vmware/modules/source# tar cf vmmon.tar vmmon-only
root@ach:/usr/lib/vmware/modules/source# rm -rf vmmon-o
vmmon-only/ vmmon-orig.tar
root@ach:/usr/lib/vmware/modules/source# rm -rf vmmon-only
root@ach:/usr/lib/vmware/modules/source# vmware-modconfig --console --install-all
Stopping 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.36-020636-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.36-020636-generic'
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driverLog.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/hostif.o
/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
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/iommu.o
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_SetupMMU’:
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:156: error: implicit declaration of function ‘iommu_map_range’
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c: In function ‘IOMMU_VMCleanup’:
/tmp/vmware-root/modules/vmmon-only/linux/iommu.c:403: error: implicit declaration of function ‘iommu_unmap_range’
make[2]: *** [/tmp/vmware-root/modules/vmmon-only/linux/iommu.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.36-020636-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'
Unable to install vmmon

Anonymous ... You may wanna

Anonymous ... You may wanna try this.
I had to reinstall my system this :-( I ended up getting the same error you got:

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

Then i went back and followed something else i did awhile back

cd /tmp
tar xvf /usr/lib/vmware/modules/source/vmmon.tar -C /tmp
perl -pi -e 's,_range,,' vmmon-only/linux/iommu.c
sudo tar cvf /usr/lib/vmware/modules/source/vmmon.tar vmmon-only

and fix some includes of course (this is basically the previous fix):

cd /lib/modules/$(uname -r)/build/include/linux && \
sudo find ../generated/ -type f -exec ln -s {} \;

After that i went back and ran:

vmware-modconfig --console --install-all

everything is okay now :D
Hope that helps anyone else who had this issue/problem

Strangely, I can't reproduce

Strangely, I can't reproduce problem with iommu_(un)map_range, but fortunately others have found a solution for that. I hope it helps you: http://pastebin.com/KzGs3Kqs