Comments

VMware – Patches Available, for Kernel 5.0-rc1. — 3 Comments

  1. Linux Kernel 5.0.0-0.rc3.git0.1.fc30.x86_64 using gcc 9.0.1 breaks vmmon in more places using latest gitHub hostif.c

    It was necessary for me to upgrade gcc to 9.0.1 to get past compound alignment bug in 9.0.0.3.

    I copied the Makefile and made a new vmnet-only userif.c file from the gitHub links and vmnet.ko recompiled successfully using make VM_UNAME=’5.0.0-0.rc3.git0.1.fc30.x86_64′

    Similarly, I copied the new vmmon-only hostif.c file from gitHub and recompiled which resulted in numerous errors not reported on the Adventures in Linux webpage. Looks like some “define” issues.

    root@BRSINC-01Fed vmmon-only]# make VM_UNAME=’5.0.0-0.rc3.git0.1.fc30.x86_64′
    Using kernel build system.
    make -C /lib/modules/5.0.0-0.rc3.git0.1.fc30.x86_64/build/include/.. M=$PWD SRCROOT=$PWD/. \
    MODULEBUILDDIR= modules
    make[1]: Entering directory ‘/usr/src/kernels/5.0.0-0.rc3.git0.1.fc30.x86_64’
    CC [M] /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.o
    In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm.h:43,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:60:
    /usr/lib/vmware/modules/source/vmmon-only/./include/x86msr.h:115: warning: “MSR_MISC_FEATURES_ENABLES” redefined
    115 | #define MSR_MISC_FEATURES_ENABLES 0x140
    |
    In file included from ./arch/x86/include/asm/nospec-branch.h:11,
    from ./arch/x86/include/asm/paravirt.h:10,
    from ./arch/x86/include/asm/irqflags.h:68,
    from ./include/linux/irqflags.h:16,
    from ./include/linux/rcupdate.h:39,
    from ./include/linux/rculist.h:11,
    from ./include/linux/pid.h:5,
    from ./include/linux/sched.h:14,
    from ./include/linux/binfmts.h:5,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:
    ./arch/x86/include/asm/msr-index.h:661: note: this is the location of the previous definition
    661 | #define MSR_MISC_FEATURES_ENABLES 0x00000140
    |
    In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm.h:43,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:60:
    /usr/lib/vmware/modules/source/vmmon-only/./include/x86msr.h:439: warning: “MSR_K7_HWCR_SMMLOCK” redefined
    439 | #define MSR_K7_HWCR_SMMLOCK 0x00000001ULL // Lock SMM environment
    |
    In file included from ./arch/x86/include/asm/nospec-branch.h:11,
    from ./arch/x86/include/asm/paravirt.h:10,
    from ./arch/x86/include/asm/irqflags.h:68,
    from ./include/linux/irqflags.h:16,
    from ./include/linux/rcupdate.h:39,
    from ./include/linux/rculist.h:11,
    from ./include/linux/pid.h:5,
    from ./include/linux/sched.h:14,
    from ./include/linux/binfmts.h:5,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:
    ./arch/x86/include/asm/msr-index.h:470: note: this is the location of the previous definition
    470 | #define MSR_K7_HWCR_SMMLOCK BIT_ULL(MSR_K7_HWCR_SMMLOCK_BIT)
    |
    In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm_x86.h:39,
    from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm_x86_64.h:40,
    from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm.h:46,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:60:
    /usr/lib/vmware/modules/source/vmmon-only/./include/x86desc.h: In function ‘Desc64_EqualIgnoreAccessed’:
    /usr/lib/vmware/modules/source/vmmon-only/./include/x86desc.h:155:4: warning: converting a packed ‘Descriptor64’ {aka ‘const struct Descriptor64’} pointer (alignment 1) to a ‘Descriptor64Union’ {aka ‘const union ’} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member]
    155 | const Descriptor64Union *du1 = (const Descriptor64Union*) d1;
    | ^~~~~
    /usr/lib/vmware/modules/source/vmmon-only/./include/x86desc.h:156:4: warning: converting a packed ‘Descriptor64’ {aka ‘const struct Descriptor64’} pointer (alignment 1) to a ‘Descriptor64Union’ {aka ‘const union ’} pointer (alignment 8) may result in an unaligned pointer value [-Waddress-of-packed-member]
    156 | const Descriptor64Union *du2 = (const Descriptor64Union*) d2;
    | ^~~~~
    In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm_x86.h:41,
    from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm_x86_64.h:40,
    from /usr/lib/vmware/modules/source/vmmon-only/./include/vm_asm.h:46,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:60:
    /usr/lib/vmware/modules/source/vmmon-only/./include/x86_basic_defs.h: At top level:
    /usr/lib/vmware/modules/source/vmmon-only/./include/x86_basic_defs.h:78: warning: “CR3_PCID_MASK” redefined
    78 | #define CR3_PCID_MASK 0xFFF
    |
    In file included from ./arch/x86/include/asm/irqflags.h:5,
    from ./include/linux/irqflags.h:16,
    from ./include/linux/rcupdate.h:39,
    from ./include/linux/rculist.h:11,
    from ./include/linux/pid.h:5,
    from ./include/linux/sched.h:14,
    from ./include/linux/binfmts.h:5,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:32:
    ./arch/x86/include/asm/processor-flags.h:39: note: this is the location of the previous definition
    39 | #define CR3_PCID_MASK 0xFFFull
    |
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIF_WakeUpYielders’:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:466:57: error: macro “FOR_EACH_POPULATED_SUBSET_IN_SET” passed 2 arguments, but takes just 1
    466 | FOR_EACH_POPULATED_SUBSET_IN_SET(subIdx, vm->numVCPUs) {
    | ^
    In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/modulecall.h:37,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:61:
    /usr/lib/vmware/modules/source/vmmon-only/./include/vcpuset.h:116: note: macro “FOR_EACH_POPULATED_SUBSET_IN_SET” defined here
    116 | #define FOR_EACH_POPULATED_SUBSET_IN_SET(_setIndex) \
    |
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:466:4: error: ‘FOR_EACH_POPULATED_SUBSET_IN_SET’ undeclared (first use in this function)
    466 | FOR_EACH_POPULATED_SUBSET_IN_SET(subIdx, vm->numVCPUs) {
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:466:4: note: each undeclared identifier is reported only once for each function it appears in
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:466:36: error: expected ‘;’ before ‘{’ token
    466 | FOR_EACH_POPULATED_SUBSET_IN_SET(subIdx, vm->numVCPUs) {
    | ^ ~
    | ;
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:454:11: warning: unused variable ‘subset’ [-Wunused-variable]
    454 | uint64 subset;
    | ^~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:453:11: warning: unused variable ‘vcpuid’ [-Wunused-variable]
    453 | Vcpuid vcpuid;
    | ^~~~~~
    In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/modulecall.h:37,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:61:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: At top level:
    /usr/lib/vmware/modules/source/vmmon-only/./include/vcpuset.h:124:4: error: expected identifier or ‘(’ before ‘}’ token
    124 | } while (0)
    | ^
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:470:6: note: in expansion of macro ‘ROF_EACH_POPULATED_SUBSET_IN_SET’
    470 | } ROF_EACH_POPULATED_SUBSET_IN_SET();
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/./include/vcpuset.h:124:6: error: expected identifier or ‘(’ before ‘while’
    124 | } while (0)
    | ^~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:470:6: note: in expansion of macro ‘ROF_EACH_POPULATED_SUBSET_IN_SET’
    470 | } ROF_EACH_POPULATED_SUBSET_IN_SET();
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from ././include/linux/compiler_types.h:68,
    from :
    ./include/linux/compiler-gcc.h:20:27: error: expected ‘(’ before ‘__volatile__’
    20 | #define barrier() __asm__ __volatile__(“”: : :”memory”)
    | ^~~~~~~~~~~~
    ./include/linux/preempt.h:242:29: note: in expansion of macro ‘barrier’
    242 | #define preempt_disable() barrier()
    | ^~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:472:4: note: in expansion of macro ‘preempt_disable’
    472 | preempt_disable();
    | ^~~~~~~~~~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:473:4: error: expected identifier or ‘(’ before ‘while’
    473 | while ((vcpuid = VCPUSet_FindFirst(&req)) != VCPUID_INVALID) {
    | ^~~~~
    In file included from ././include/linux/compiler_types.h:68,
    from :
    ./include/linux/compiler-gcc.h:20:27: error: expected ‘(’ before ‘__volatile__’
    20 | #define barrier() __asm__ __volatile__(“”: : :”memory”)
    | ^~~~~~~~~~~~
    ./include/linux/preempt.h:245:28: note: in expansion of macro ‘barrier’
    245 | #define preempt_enable() barrier()
    | ^~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:482:4: note: in expansion of macro ‘preempt_enable’
    482 | preempt_enable();
    | ^~~~~~~~~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:483:1: error: expected identifier or ‘(’ before ‘}’ token
    483 | }
    | ^
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIFFreeVMHost’:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1022:4: error: implicit declaration of function ‘Vmx86_Free’; did you mean ‘Vmx86_Open’? [-Werror=implicit-function-declaration]
    1022 | Vmx86_Free(vmhost->crosspagePages);
    | ^~~~~~~~~~
    | Vmx86_Open
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1024:27: error: assignment to expression with array type
    1024 | vmhost->crosspagePages = NULL;
    | ^
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1025:27: error: assignment to expression with array type
    1025 | vmhost->vcpuSemaTask = NULL;
    | ^
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIFAllocVMHost’:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1049:21: error: implicit declaration of function ‘Vmx86_Calloc’; did you mean ‘Vmx86_Close’? [-Werror=implicit-function-declaration]
    1049 | VMHost *vmhost = Vmx86_Calloc(1, sizeof *vmhost, TRUE);
    | ^~~~~~~~~~~~
    | Vmx86_Close
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1049:21: warning: initialization of ‘VMHost *’ {aka ‘struct VMHost *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1053:32: error: assignment to expression with array type
    1053 | if ((vmhost->crosspagePages =
    | ^
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1055:30: error: assignment to expression with array type
    1055 | (vmhost->vcpuSemaTask =
    | ^
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: At top level:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:1081:1: error: conflicting types for ‘HostIF_Init’
    1081 | HostIF_Init(VMDriver *vm, uint32 numVCPUs)
    | ^~~~~~~~~~~
    In file included from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:67:
    /usr/lib/vmware/modules/source/vmmon-only/./common/hostif.h:69:14: note: previous declaration of ‘HostIF_Init’ was here
    69 | EXTERN int HostIF_Init(VMDriver *vm);
    | ^~~~~~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIF_SemaphoreForceWakeup’:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2669:4: error: implicit declaration of function ‘FOR_EACH_VCPU_IN_SET_WITH_MAX’; did you mean ‘FOR_EACH_VCPU_IN_SET’? [-Werror=implicit-function-declaration]
    2669 | FOR_EACH_VCPU_IN_SET_WITH_MAX(vcs, vcpuid, vm->numVCPUs) {
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | FOR_EACH_VCPU_IN_SET
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2669:39: error: ‘vcpuid’ undeclared (first use in this function); did you mean ‘Vcpuid’?
    2669 | FOR_EACH_VCPU_IN_SET_WITH_MAX(vcs, vcpuid, vm->numVCPUs) {
    | ^~~~~~
    | Vcpuid
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2669:60: error: expected ‘;’ before ‘{’ token
    2669 | FOR_EACH_VCPU_IN_SET_WITH_MAX(vcs, vcpuid, vm->numVCPUs) {
    | ^~
    | ;
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIF_OneIPI’:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2775:34: error: passing argument 1 of ‘Atomic_Read32’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    2775 | targetHostCpu = Atomic_Read32(&vm->currentHostCpu[v]);
    | ^~~~~~~~~~~~~~~~~~~~~~
    | |
    | volatile uint32 * {aka volatile unsigned int *}
    In file included from /usr/lib/vmware/modules/source/vmmon-only/./include/rateconv.h:45,
    from /usr/lib/vmware/modules/source/vmmon-only/./include/ptsc.h:35,
    from /usr/lib/vmware/modules/source/vmmon-only/./include/modulecall.h:35,
    from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:61:
    /usr/lib/vmware/modules/source/vmmon-only/./include/vm_atomic.h:911:36: note: expected ‘const Atomic_uint32 *’ {aka ‘const struct Atomic_uint32 *’} but argument is of type ‘volatile uint32 *’ {aka ‘volatile unsigned int *’}
    911 | Atomic_Read32(Atomic_uint32 const *var) // IN
    | ~~~~~~~~~~~~~~~~~~~~~^~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: At top level:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2798:1: error: conflicting types for ‘HostIF_IPI’
    2798 | HostIF_IPI(VMDriver *vm, // IN:
    | ^~~~~~~~~~
    In file included from /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:67:
    /usr/lib/vmware/modules/source/vmmon-only/./common/hostif.h:107:22: note: previous declaration of ‘HostIF_IPI’ was here
    107 | EXTERN HostIFIPIMode HostIF_IPI(VMDriver *vm, const VCPUSet *vcs);
    | ^~~~~~~~~~
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIF_IPI’:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2801:46: error: ‘v’ undeclared (first use in this function); did you mean ‘vm’?
    2801 | FOR_EACH_VCPU_IN_SET_WITH_MAX(ipiTargets, v, vm->numVCPUs) {
    | ^
    | vm
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2801:62: error: expected ‘;’ before ‘{’ token
    2801 | FOR_EACH_VCPU_IN_SET_WITH_MAX(ipiTargets, v, vm->numVCPUs) {
    | ^~
    | ;
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c: In function ‘HostIFGetCpuInfo’:
    /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.c:2846:41: warning: taking address of packed member of ‘struct CPUIDReply’ may result in an unaligned pointer value [-Waddress-of-packed-member]
    2846 | __GET_CPUID2(query->eax, query->ecx, &query->logicalCPUs[index].regs);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[2]: *** [scripts/Makefile.build:277: /usr/lib/vmware/modules/source/vmmon-only/linux/hostif.o] Error 1
    make[1]: *** [Makefile:1557: _module_/usr/lib/vmware/modules/source/vmmon-only] Error 2
    make[1]: Leaving directory ‘/usr/src/kernels/5.0.0-0.rc3.git0.1.fc30.x86_64’
    make: *** [Makefile:110: vmnet.ko] Error 2
    [root@BRSINC-01Fed vmmon-only]#

  2. I downgraded to nodebug kernel 5.0.0-0.rc4.git2.2.fc30.x86_64 and still am getting compile errors for VMware driver sources. The VMNET did compile and install successfully. VMMON has still has many errors. I believe we can rule out debug as the culprit. The gcc.x86_64 9.0.1-0.3.fc30 compile has bugs or has changed the rules!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.