Skip to content

RepairYourTech/vmware-vmmon-vmnet-linux-6.18

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

VMware Kernel 6.18 Compatibility Patches ⚑

License Kernel VMware

Complete fix for VMware Workstation 17.6.4 on Linux kernel 6.18

🎯 What This Fixes

This patch set adds full support for Linux kernel 6.18 to VMware Workstation 17.6.4 kernel modules (vmmon and vmnet).

Key Issues Resolved

  • βœ… Timer API changes: del_timer_sync() β†’ timer_delete_sync() (kernel 6.16+)
  • βœ… MSR API changes: rdmsrl_safe() β†’ rdmsrq_safe()
  • βœ… UACCESS validation: Fixed csum_partial_copy_nocheck() β†’ unsafe_copy_to_user()
  • βœ… Missing headers: Created driver-config.h and vm_basic_defs.h
  • βœ… Build system: Fixed objtool validation and kernel 6.18 build requirements
  • βœ… Debug infrastructure: Added VMX86_DEBUG support and missing variables

πŸ“‹ Requirements

  • Linux kernel 6.18.x
  • VMware Workstation 17.6.4
  • GCC compiler
  • Linux kernel headers for your kernel version
  • Root/sudo access for module installation

πŸš€ Quick Install

Option 1: Automated Installation (Recommended)

# Clone this repository
git clone https://github.com/RepairYourTech/vmware-vmmon-vmnet-linux-6.18.git
cd vmware-vmmon-vmnet-linux-6.18

# Build and install both modules
make -C vmmon-only
sudo make -C vmmon-only install

make -C vmnet-only
sudo make -C vmnet-only install

# Load modules
sudo modprobe vmmon
sudo modprobe vmnet

Option 2: Manual Installation

# Extract VMware module sources
tar -xf /usr/lib/vmware/modules/source/vmmon.tar
tar -xf /usr/lib/vmware/modules/source/vmnet.tar

# Copy patched files
cp -r vmmon-only/* vmmon-only/
cp -r vmnet-only/* vmnet-only/

# Build
cd vmmon-only
make
sudo make install

cd ../vmnet-only
make
sudo make install

# Load modules
sudo modprobe vmmon
sudo modprobe vmnet

πŸ”§ Technical Details

vmmon Module Changes

New Files

  • driver-config.h: Kernel version macros and configuration
  • include/vm_basic_defs.h: Missing type definitions and macros
    • MASK64/MASK32/PAGE_MASK macros
    • CONC/CONC3 token concatenation
    • Value extraction macros (LODWORD, HIDWORD, etc.)
    • Memory unit conversions (MBYTES_2_PAGES, GBYTES_2_PAGES)
    • DEBUG_ONLY, IMPLIES, VM_PAGE_BASE macros
    • Global debug variables (vmx86_debug, vmx86_log, vmx86_server)

Modified Files

  • linux/hostif.c:
    • del_timer_sync() β†’ timer_delete_sync()
    • rdmsrl_safe() β†’ rdmsrq_safe()
  • linux/driver.c: Added debug variable definitions
  • include/x86vtinstr.h: Added debug variable extern declarations
  • Makefile.kernel: Added -DVMX86_DEBUG and disabled objtool validation

vmnet Module Changes

Modified Files

  • userif.c:
    • Added kernel 6.18 support path to VNetCsumAndCopyToUser()
    • Replaced csum_partial_copy_nocheck() with unsafe_copy_to_user()
    • Fixed UACCESS validation by computing checksum outside user access block

πŸ§ͺ Tested Configurations

Distribution Kernel Version Status
Ubuntu 26.04 (dev) 6.18.0-9-generic βœ… Working
VMware Workstation 17.6.4 βœ… Compatible

πŸ“ Project Structure

.
β”œβ”€β”€ vmmon-only/              # vmmon module source
β”‚   β”œβ”€β”€ driver-config.h      # NEW: Kernel config
β”‚   β”œβ”€β”€ include/
β”‚   β”‚   └── vm_basic_defs.h  # NEW: Type definitions
β”‚   β”œβ”€β”€ linux/
β”‚   β”‚   β”œβ”€β”€ hostif.c         # MODIFIED: API updates
β”‚   β”‚   └── driver.c         # MODIFIED: Debug vars
β”‚   └── Makefile.kernel      # MODIFIED: Build flags
└── vmnet-only/              # vmnet module source
    └── userif.c             # MODIFIED: UACCESS fix

πŸ” Troubleshooting

Modules won't load

# Check kernel log
dmesg | tail -20

# Verify module signatures
modinfo /lib/modules/$(uname -r)/misc/vmmon.ko
modinfo /lib/modules/$(uname -r)/misc/vmnet.ko

Compilation errors

# Ensure you have kernel headers installed
sudo apt install linux-headers-$(uname -r)

# Check GCC version
gcc --version

VMware still shows errors

# Unload and reload modules
sudo modprobe -r vmnet vmmon
sudo modprobe vmmon vmnet

# Restart VMware services
sudo systemctl restart vmware

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ“œ License

This project is licensed under GPL v2, matching the Linux kernel license and VMware's open-source components.

πŸ™ Acknowledgments

⚠️ Disclaimer

These patches are provided as-is. While they have been tested on Ubuntu 26.04 with kernel 6.18.0-9-generic, your mileage may vary. Always backup your system before installing kernel modules.

πŸ“Š Changelog

v1.0.0 (2025-01-23)

  • Initial release for kernel 6.18
  • Full vmmon and vmnet module support
  • All API compatibility issues resolved
  • Successfully tested on Ubuntu 26.04

πŸ”— Links


Made with ❀️ for the Linux and VMware community

About

VMware Workstation kernel modules compatibility patches for Linux kernel 6.18

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors