VMware Communities
ElCoyote_
Enthusiast
Enthusiast

VMWare 14.1.x, vmblock, vmci broken on FC26/EL7.4 -=again=-

VMWare workstation 14.1.0/14.1.1 is still broken on Linux on both Fedora 26/27 and RHEL7.4.

RHEL7.4:

vmblock kernel module fails to compile with:

# gmake

Using kernel build system.

gmake -C /lib/modules/3.10.0-693.11.6.el7.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

  MODULEBUILDDIR= modules

gmake[1]: Entering directory `/usr/src/kernels/3.10.0-693.11.6.el7.x86_64'

  CC [M]  /tmp/vm/vmblock-only/linux/filesystem.o

  CC [M]  /tmp/vm/vmblock-only/linux/file.o

  CC [M]  /tmp/vm/vmblock-only/linux/block.o

  CC [M]  /tmp/vm/vmblock-only/linux/inode.o

/tmp/vm/vmblock-only/linux/inode.c:49:4: warning: initialization from incompatible pointer type [enabled by default]

    .lookup = InodeOpLookup,

    ^

/tmp/vm/vmblock-only/linux/inode.c:49:4: warning: (near initialization for ‘RootInodeOps.lookup’) [enabled by default]

/tmp/vm/vmblock-only/linux/inode.c: In function ‘InodeOpLookup’:

/tmp/vm/vmblock-only/linux/inode.c:138:32: error: incompatible types when assigning to type ‘kgid_t’ from type ‘int’

    inode->i_uid = inode->i_gid = 0;

                                ^

gmake[2]: *** [/tmp/vm/vmblock-only/linux/inode.o] Error 1

gmake[1]: *** [_module_/tmp/vm/vmblock-only] Error 2

gmake[1]: Leaving directory `/usr/src/kernels/3.10.0-693.11.6.el7.x86_64'

gmake: *** [vmblock.ko] Error 2

Fedora 26:

vmblock kernel module fails to compile with:

# gmake

Using kernel build system.

gmake -C /lib/modules/4.14.11-200.fc26.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

  MODULEBUILDDIR= modules

gmake[1]: Entering directory '/usr/src/kernels/4.14.11-200.fc26.x86_64'

  CC [M]  /tmp/vm/vmblock-only/linux/filesystem.o

/tmp/vm/vmblock-only/linux/filesystem.c: In function ‘Iget’:

/tmp/vm/vmblock-only/linux/filesystem.c:325:21: error: storage size of ‘actualNd’ isn’t known

    struct nameidata actualNd;

                     ^~~~~~~~

/tmp/vm/vmblock-only/linux/filesystem.c:325:21: warning: unused variable ‘actualNd’ [-Wunused-variable]

gmake[2]: *** [scripts/Makefile.build:315: /tmp/vm/vmblock-only/linux/filesystem.o] Error 1

gmake[1]: *** [Makefile:1511: _module_/tmp/vm/vmblock-only] Error 2

gmake[1]: Leaving directory '/usr/src/kernels/4.14.11-200.fc26.x86_64'

gmake: *** [Makefile:110: vmblock.ko] Error 2

vmci kernel module fails to compile with:

# gmake

Using kernel build system.

gmake -C /lib/modules/4.14.11-200.fc26.x86_64/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \

  MODULEBUILDDIR= modules

gmake[1]: Entering directory '/usr/src/kernels/4.14.11-200.fc26.x86_64'

  CC [M]  /tmp/vm/vmci-only/linux/driver.o

In file included from /tmp/vm/vmci-only/linux/driver.c:60:0:

/tmp/vm/vmci-only/./shared/vm_device_version.h:56:0: warning: "PCI_VENDOR_ID_VMWARE" redefined

#define PCI_VENDOR_ID_VMWARE                    0x15AD

In file included from ./include/linux/pci.h:37:0,

                 from /tmp/vm/vmci-only/./shared/compat_pci.h:27,

                 from /tmp/vm/vmci-only/linux/driver.c:49:

./include/linux/pci_ids.h:2261:0: note: this is the location of the previous definition

#define PCI_VENDOR_ID_VMWARE  0x15ad

In file included from /tmp/vm/vmci-only/linux/driver.c:60:0:

/tmp/vm/vmci-only/./shared/vm_device_version.h:73:0: warning: "PCI_DEVICE_ID_VMWARE_VMXNET3" redefined

#define PCI_DEVICE_ID_VMWARE_VMXNET3            0x07B0

In file included from ./include/linux/pci.h:37:0,

                 from /tmp/vm/vmci-only/./shared/compat_pci.h:27,

                 from /tmp/vm/vmci-only/linux/driver.c:49:

./include/linux/pci_ids.h:2262:0: note: this is the location of the previous definition

#define PCI_DEVICE_ID_VMWARE_VMXNET3 0x07b0

/tmp/vm/vmci-only/linux/driver.c: In function ‘VMCIUserVALockPage’:

/tmp/vm/vmci-only/linux/driver.c:1470:43: error: passing argument 5 of ‘get_user_pages’ from incompatible pointer type [-Werror=incompatible-pointer-types]

    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);

                                           ^

In file included from ./include/linux/highmem.h:8:0,

                 from /tmp/vm/vmci-only/./shared/compat_highmem.h:22,

                 from /tmp/vm/vmci-only/linux/driver.c:41:

./include/linux/mm.h:1364:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’

long get_user_pages(unsigned long start, unsigned long nr_pages,

      ^~~~~~~~~~~~~~

/tmp/vm/vmci-only/linux/driver.c:1470:13: error: too many arguments to function ‘get_user_pages’

    retval = get_user_pages(addr, 1, 1, 0, &page, NULL);

             ^~~~~~~~~~~~~~

In file included from ./include/linux/highmem.h:8:0,

                 from /tmp/vm/vmci-only/./shared/compat_highmem.h:22,

                 from /tmp/vm/vmci-only/linux/driver.c:41:

./include/linux/mm.h:1364:6: note: declared here

long get_user_pages(unsigned long start, unsigned long nr_pages,

      ^~~~~~~~~~~~~~

/tmp/vm/vmci-only/linux/driver.c: In function ‘vmci_enable_msix’:

/tmp/vm/vmci-only/linux/driver.c:1725:13: error: implicit declaration of function ‘pci_enable_msix’; did you mean ‘pci_enable_msi’? [-Werror=implicit-function-declaration]

    result = pci_enable_msix(pdev, vmci_dev.msix_entries, VMCI_MAX_INTRS);

             ^~~~~~~~~~~~~~~

             pci_enable_msi

/tmp/vm/vmci-only/linux/driver.c: In function ‘vmci_exit’:

/tmp/vm/vmci-only/linux/driver.c:2493:14: error: void value not ignored as it ought to be

       retval = misc_deregister(&linuxState.misc);

              ^

cc1: some warnings being treated as errors

gmake[2]: *** [scripts/Makefile.build:315: /tmp/vm/vmci-only/linux/driver.o] Error 1

gmake[1]: *** [Makefile:1511: _module_/tmp/vm/vmci-only] Error 2

gmake[1]: Leaving directory '/usr/src/kernels/4.14.11-200.fc26.x86_64'

gmake: *** [Makefile:110: vmci.ko] Error 2

Could the -current- developers at least check GitHub - vmware/open-vm-tools: Official repository of VMware open-vm-tools project to see if some of the fixes there could apply to the mainstream desktop product in order to make it work somewhat better?

0 Kudos
2 Replies
dariusd
VMware Employee
VMware Employee

Hi ElCoyote_,

Why are you attempting to build those modules?

vmblock is not used on any modern Linux kernel: Its role is now fulfilled by a FUSE module.  The vmblock module is no longer actively developed, exists only for legacy compatibility, and -- as you've found -- no longer builds on modern kernels.

vmci is not built from our sources on any modern Linux kernel: The driver has been upstreamed into the Linux kernel, and you should always use your kernel's own vmw_vmci driver.  We still ship the vmci sources for use only on distros with older kernels, on which it should still build successfully.

Cheers,

--

Darius

0 Kudos
ElCoyote_
Enthusiast
Enthusiast

Hi Dariusd,

That's a very good point.. I only attempted to build these modules because the 'vmware' startup script complained about errors:

[root@palanthas ~]# cp -a /etc/init.d/vmware .

[root@palanthas ~]# ./vmware start

Starting VMware services:

   Virtual machine monitor                                 [  OK  ]

   Virtual machine communication interface                 [  OK  ]

   VM communication interface socket family                [FAILED]   <======= (that's vmci)

   Blocking file system                                    [  OK  ]

   Virtual ethernet                                        [  OK  ]

   VMware Authentication Daemon                            [  OK  ]

   Shared Memory Available                                 [  OK  ]

So on el7 and other we should be using the kernel's own vmw_vmci driver? That's good to know..

Thanks,

0 Kudos