diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 65 | ||||
-rw-r--r-- | config | 34 | ||||
-rw-r--r-- | unlocker.py | 21 | ||||
-rw-r--r-- | vmmon.patch | 240 | ||||
-rw-r--r-- | vmnet.patch | 50 | ||||
-rw-r--r-- | vmware-bootstrap (renamed from bootstrap) | 0 |
7 files changed, 171 insertions, 255 deletions
@@ -1,7 +1,7 @@ pkgbase = vmware-workstation11 pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC. pkgver = 11.1.4 - pkgrel = 7 + pkgrel = 8 url = https://www.vmware.com/products/workstation-for-linux.html install = vmware-workstation.install arch = x86_64 @@ -9,7 +9,6 @@ pkgbase = vmware-workstation11 makedepends = sqlite makedepends = python2 makedepends = unzip - depends = vmware-keymaps depends = dkms depends = ncurses5-compat-libs depends = fuse2 @@ -18,6 +17,7 @@ pkgbase = vmware-workstation11 depends = hicolor-icon-theme depends = fontconfig depends = freetype2 + depends = vmware-keymaps optdepends = linux-headers: build modules against Arch kernel provides = vmware-workstation=11.1.4 provides = vmware-ovftool @@ -40,7 +40,7 @@ pkgbase = vmware-workstation11 backup = etc/pam.d/vmware-authd backup = etc/conf.d/vmware source = https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-11.1.4-3848939.x86_64.bundle - source = bootstrap + source = vmware-bootstrap source = vmware-vix-bootstrap source = config source = pam.d-vmware-authd @@ -61,12 +61,12 @@ pkgbase = vmware-workstation11 source = Makefile source = vmmon.patch source = vmnet.patch - source = https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/7.1.3/3204469/packages/com.vmware.fusion.tools.darwin.zip.tar + source = darwin-tools-7.1.3_3204469.zip.tar::https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/7.1.3/3204469/packages/com.vmware.fusion.tools.darwin.zip.tar source = unlocker.py sha256sums = d6b158a03d94db2d274dbf695337c564987f373c1ff5896665f3d1590617bc04 sha256sums = 12e7b16abf8d7e858532edabb8868919c678063c566a6535855b194aac72d55e sha256sums = da1698bf4e73ae466c1c7fc93891eba4b9c4581856649635e6532275dbfea141 - sha256sums = a148a3e40f12929707cda38f775a1ad4d4203f6ed0494437c3a072da9efa5d5c + sha256sums = 05438e72a49c784c59f2e06baf8c6ab20bf4690f244956187c63f2c1c709e310 sha256sums = d50aa0a3fe94025178965d988e18d41eb60aa1ce2b28ee6e3ca15edeabfa2ca7 sha256sums = 8e4d08668a66be79a900521792b39c16a026cc90659241edee80b64e701bfbcd sha256sums = 0c5f33796271ec8c6f26cf5c736117e87e9789c18326494c2bc789d4318a4b9a @@ -83,10 +83,10 @@ pkgbase = vmware-workstation11 sha256sums = d7a9fbf39a0345ae2f14f7f389f30b1110f605d187e0c241e99bbb18993c250d sha256sums = 05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487 sha256sums = 6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d - sha256sums = 9ebcab451208860237ff2f4c9b3c3d98e0dcae61f9175bb3d69f8190f97af59c - sha256sums = 02d9934b4fbfd219a30f4d8365b8cc394719b4907946aad2e619359a778f6c09 + sha256sums = b6d4969ffa5c40417cdbeb27b2ba3b115be5156a40ddc12cec098a8d68ad5acf + sha256sums = 5d91d4e9db5cc6c228bb3897bd271da278235bc591d25b8e88e5f8432adffbb5 sha256sums = 09711e59f708576d2fb09c464ebbb52806cb7f850cb3d5bbeea634fa58fb6c86 - sha256sums = 29e0b0db9c0296ab81eee543803c4bd430e2c69c76e33492910e17280da1c05c + sha256sums = ecf6d9186f109ec420287bd327e1f1f407de8e4b9e3faa23828bcf903f6246c6 pkgname = vmware-workstation11 @@ -6,17 +6,24 @@ #_enable_macOS_guests=y -# CAUTION: Run macOS on a non Apple computer may be forbidden in your country. +# CAUTION: Running macOS on VMware Workstation on non Apple computer is forbidden by +# Apple and VMware EULAs. # Source of the patch: https://github.com/DrDonk/unlocker -# Forum: http://www.insanelymac.com/forum/topic/303311-workstation-1112-player-712-fusion-78-and-esxi-6-mac-os-x-unlocker-2 +# Forum: https://www.insanelymac.com/forum/topic/335757-macos-unlocker-v30-for-vmware-workstation/ ############################################################################ +# vmware-keymaps dependency is needed to avoid some conflicts when you install +# this package with vmware-horizon-client. If you don't plan to install +# vmware-horizon-client and don't want to add this dependency, you can +# uncomment the line below: +#_remove_vmware_keymaps_dependency=y + #PKGEXT=.pkg.tar pkgname=vmware-workstation11 pkgver=11.1.4 _buildver=3848939 _pkgver=${pkgver}_${_buildver} -pkgrel=7 +pkgrel=8 pkgdesc='The industry standard for running multiple operating systems as virtual machines on a single Linux PC.' arch=(x86_64) url='https://www.vmware.com/products/workstation-for-linux.html' @@ -34,7 +41,6 @@ provides=( vmware-ovftool ) depends=( - vmware-keymaps dkms ncurses5-compat-libs fuse2 @@ -68,7 +74,7 @@ backup=( source=( "https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-${_pkgver/_/-}.${CARCH}.bundle" - 'bootstrap' + 'vmware-bootstrap' 'vmware-vix-bootstrap' 'config' 'pam.d-vmware-authd' @@ -98,7 +104,7 @@ sha256sums=( '12e7b16abf8d7e858532edabb8868919c678063c566a6535855b194aac72d55e' 'da1698bf4e73ae466c1c7fc93891eba4b9c4581856649635e6532275dbfea141' - 'a148a3e40f12929707cda38f775a1ad4d4203f6ed0494437c3a072da9efa5d5c' + '05438e72a49c784c59f2e06baf8c6ab20bf4690f244956187c63f2c1c709e310' 'd50aa0a3fe94025178965d988e18d41eb60aa1ce2b28ee6e3ca15edeabfa2ca7' '8e4d08668a66be79a900521792b39c16a026cc90659241edee80b64e701bfbcd' '0c5f33796271ec8c6f26cf5c736117e87e9789c18326494c2bc789d4318a4b9a' @@ -118,11 +124,16 @@ sha256sums=( '05e26d8b21d190ebabb7f693998114d9d5991d9dfb71acb4d990293a65b6b487' '6ce902b1dab8fc69be253abd8e79017011985eca850ff7acc7282f9ab668e35d' - '9ebcab451208860237ff2f4c9b3c3d98e0dcae61f9175bb3d69f8190f97af59c' - '02d9934b4fbfd219a30f4d8365b8cc394719b4907946aad2e619359a778f6c09' + 'b6d4969ffa5c40417cdbeb27b2ba3b115be5156a40ddc12cec098a8d68ad5acf' + '5d91d4e9db5cc6c228bb3897bd271da278235bc591d25b8e88e5f8432adffbb5' ) options=(!strip emptydirs) +if [ -z "$_remove_vmware_keymaps_dependency" ]; then +depends+=( + vmware-keymaps +) +fi _isoimages=(freebsd linux netware solaris windows winPre2k) @@ -137,12 +148,12 @@ makedepends+=( ) source+=( - "https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${_vmware_fusion_ver/_//}/packages/com.vmware.fusion.tools.darwin.zip.tar" + "darwin-tools-${_vmware_fusion_ver}.zip.tar::https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${_vmware_fusion_ver/_//}/packages/com.vmware.fusion.tools.darwin.zip.tar" 'unlocker.py' ) sha256sums+=( '09711e59f708576d2fb09c464ebbb52806cb7f850cb3d5bbeea634fa58fb6c86' - '29e0b0db9c0296ab81eee543803c4bd430e2c69c76e33492910e17280da1c05c' + 'ecf6d9186f109ec420287bd327e1f1f407de8e4b9e3faa23828bcf903f6246c6' ) _fusion_isoimages=(darwin) @@ -184,7 +195,9 @@ if [ -n "$_enable_macOS_guests" ]; then for isoimage in ${_fusion_isoimages[@]} do unzip -q com.vmware.fusion.tools.$isoimage.zip - rm manifest.plist + install -Dm 644 "$srcdir/payload/$isoimage.iso" "$srcdir/fusion-isoimages/$isoimage.iso" + install -Dm 644 "$srcdir/payload/$isoimage.iso.sig" "$srcdir/fusion-isoimages/$isoimage.iso.sig" + rm -rf payload manifest.plist done sed -i -e "s|/usr/lib/vmware/|${pkgdir}/usr/lib/vmware/|" "$srcdir/unlocker.py" @@ -280,9 +293,11 @@ package() { install -Dm 644 "vmware-player-app/doc/LearnMore.txt" "$pkgdir/usr/share/licenses/$pkgname/Privacy.txt" install -Dm 644 "vmware-workstation/doc/EULA" "$pkgdir/usr/share/licenses/$pkgname/VMware Workstation - EULA.txt" - install -Dm 644 "vmware-workstation/doc"/*open_source_licenses.txt "$pkgdir/usr/share/licenses/$pkgname" - mv "$pkgdir/usr/lib/vmware-ovftool/vmware.eula" "$pkgdir/usr/share/licenses/$pkgname/VMware OVF Tool component for Linux - EULA.txt" - rm "$pkgdir/usr/lib/vmware-ovftool"/{vmware-eula.rtf,open_source_licenses.txt,manifest.xml} + install -Dm 644 "$pkgdir/usr/lib/vmware-ovftool/vmware.eula" "$pkgdir/usr/share/licenses/$pkgname/VMware OVF Tool - EULA.txt" + install -Dm 644 "vmware-workstation/doc"/open_source_licenses.txt "$pkgdir/usr/share/licenses/$pkgname/VMware Workstation open source license.txt" + install -Dm 644 "vmware-workstation/doc"/ovftool_open_source_licenses.txt "$pkgdir/usr/share/licenses/$pkgname/VMware OVF Tool open source license.txt" + install -Dm 644 "vmware-vix-core"/open_source_licenses.txt "$pkgdir/usr/share/licenses/$pkgname/VMware VIX open source license.txt" + rm "$pkgdir/usr/lib/vmware-ovftool"/{vmware.eula,vmware-eula.rtf,open_source_licenses.txt,manifest.xml} install -Dm 755 "$srcdir/configure-initscript.sh" "$pkgdir/usr/lib/vmware-installer/$vmware_installer_version/bin/configure-initscript.sh" @@ -290,12 +305,15 @@ package() { install -Dm 644 vmware-player-app/lib/isoimages/tools-key.pub "$pkgdir/usr/lib/vmware/isoimages/tools-key.pub" - install -Dm 644 vmware-vmx/extra/modules.xml "$pkgdir/usr/lib/vmware/modules/modules.xml" - install -Dm 644 vmware-installer/bootstrap "$pkgdir/etc/vmware-installer/bootstrap" - install -Dm 644 "$srcdir/vmware-vix-bootstrap" "$pkgdir/etc/vmware-vix/bootstrap" - install -Dm 644 "$srcdir"/{bootstrap,config} "$pkgdir/etc/vmware" + install -Dm 644 vmware-vmx/extra/modules.xml "$pkgdir"/usr/lib/vmware/modules/modules.xml + install -Dm 644 vmware-installer/bootstrap "$pkgdir"/etc/vmware-installer/bootstrap + install -Dm 644 "$srcdir"/vmware-vix-bootstrap "$pkgdir"/etc/vmware-vix/bootstrap + install -Dm 644 "$srcdir"/vmware-bootstrap "$pkgdir"/etc/vmware/bootstrap + install -Dm 644 "$srcdir"/config "$pkgdir"/etc/vmware/config - rm -r "$pkgdir/usr/lib/vmware/xkeymap" # these files are now provided by vmware-keymaps package +if [ -z "$_remove_vmware_keymaps_dependency" ]; then + rm -r "$pkgdir/usr/lib/vmware/xkeymap" # these files are provided by vmware-keymaps package +fi for hostd_file in config datastores environments proxy vmAutoStart; do install -Dm 644 "$srcdir/$hostd_file.xml" "$pkgdir/etc/vmware/hostd/$hostd_file.xml" @@ -427,8 +445,8 @@ if [ -n "$_enable_macOS_guests" ]; then for isoimage in ${_fusion_isoimages[@]} do - install -Dm 644 "$srcdir/payload/$isoimage.iso" "$pkgdir/usr/lib/vmware/isoimages/$isoimage.iso" - install -Dm 644 "$srcdir/payload/$isoimage.iso.sig" "$pkgdir/usr/lib/vmware/isoimages/$isoimage.iso.sig" + install -Dm 644 "$srcdir/fusion-isoimages/$isoimage.iso" "$pkgdir/usr/lib/vmware/isoimages/$isoimage.iso" + install -Dm 644 "$srcdir/fusion-isoimages/$isoimage.iso.sig" "$pkgdir/usr/lib/vmware/isoimages/$isoimage.iso.sig" done fi @@ -442,6 +460,11 @@ fi -i "$pkgdir/usr/bin/$program" done + # Add StartupWMClass attribute to desktop files + sed -i '/^StartupNotify=.*/a StartupWMClass=vmware' "$pkgdir/usr/share/applications/vmware-workstation.desktop" + sed -i '/^StartupNotify=.*/a StartupWMClass=vmplayer' "$pkgdir/usr/share/applications/vmware-player.desktop" + sed -i '/^StartupNotify=.*/a StartupWMClass=vmware-netcfg' "$pkgdir/usr/share/applications/vmware-netcfg.desktop" + # use system font rendering ln -sf /usr/lib/libfreetype.so.6 "$pkgdir/usr/lib/vmware/lib/libfreetype.so.6/" ln -sf /usr/lib/libfontconfig.so.1 "$pkgdir/usr/lib/vmware/lib/libfontconfig.so.1/" # avoid a conflict with fontconfig when VMWARE_USE_SHIPPED_LIBS is defined @@ -1,26 +1,24 @@ .encoding = "UTF-8" -NETWORKING = "yes" -VMBLOCK_CONFED = "yes" -gksu.rootMethod = "su" +product.name = "VMware Workstation" +product.version = "11.1.4" +product.buildNumber = "3848939" +workstation.product.version = "11.1.4" +player.product.version = "7.1.4" +vix.config.version = "1" +bindir = "/usr/bin" libdir = "/usr/lib/vmware" -VMCI_CONFED = "yes" -VSOCK_CONFED = "yes" +vix.libdir = "/usr/lib/vmware-vix" initscriptdir = "/usr/lib/systemd/scripts" -authd.fullpath = "/usr/bin/vmware-authd" -bindir = "/usr/bin" vmware.fullpath = "/usr/bin/vmware" -vix.libdir = "/usr/lib/vmware-vix" -installerDefaults.componentDownloadEnabled = "no" -installerDefaults.autoSoftwareUpdateEnabled.epoch = "6443199724" -vix.config.version = "1" -player.product.version = "7.1.4" -installerDefaults.dataCollectionEnabled.epoch = "4316353219" +authd.fullpath = "/usr/bin/vmware-authd" +gksu.rootMethod = "su" +NETWORKING = "yes" +VMBLOCK_CONFED = "no" +VMCI_CONFED = "no" +VSOCK_CONFED = "no" +installerDefaults.autoSoftwareUpdateEnabled = "no" installerDefaults.dataCollectionEnabled = "no" +installerDefaults.componentDownloadEnabled = "no" installerDefaults.transferVersion = "1" -installerDefaults.autoSoftwareUpdateEnabled = "no" -product.buildNumber = "3848939" authd.client.port = "902" authd.proxy.nfc = "vmware-hostd:ha-nfc" -product.version = "11.1.4" -workstation.product.version = "11.1.4" -product.name = "VMware Workstation" diff --git a/unlocker.py b/unlocker.py index decbc51b76ac..0f9d3f66eeba 100644 --- a/unlocker.py +++ b/unlocker.py @@ -44,6 +44,7 @@ Offset Length Struct Type Description from __future__ import print_function import codecs import os +import re import struct import sys @@ -55,7 +56,10 @@ if sys.version_info < (2, 7): if sys.platform == 'win32' \ or sys.platform == 'cli': # noinspection PyUnresolvedReferences - from _winreg import * + if sys.version_info > (3, 0): + from winreg import * + else: + from _winreg import * def bytetohex(data): @@ -301,9 +305,10 @@ def patchbase(name): f = open(name, 'r+b') # Entry to search for in GOS table - # Should work for 12 & 14 of Workstation... - darwin = b'\x10\x00\x00\x00\x10\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00' \ - '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' + # Should work for Workstation 12-15... + darwin = re.compile( + b'\x10\x00\x00\x00[\x10|\x20]\x00\x00\x00[\x01|\x02]\x00\x00\x00\x00\x00\x00\x00' + b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') # Read file into string variable base = f.read() @@ -311,11 +316,8 @@ def patchbase(name): # Loop through each entry and set top bit # 0xBE --> 0xBF (WKS 12) # 0x3E --> 0x3F (WKS 14) - offset = 0 - while offset < len(base): - offset = base.find(darwin, offset) - if offset == -1: - break + for m in darwin.finditer(base): + offset = m.start() f.seek(offset + 32) flag = ord(f.read(1)) flag = set_bit(flag, 0) @@ -323,7 +325,6 @@ def patchbase(name): f.seek(offset + 32) f.write(flag) print('GOS Patched flag @: ' + hex(offset)) - offset += 40 # Tidy up f.flush() diff --git a/vmmon.patch b/vmmon.patch index df5d5a69913f..49856121ae62 100644 --- a/vmmon.patch +++ b/vmmon.patch @@ -12,6 +12,29 @@ # Header directory for the running kernel ifdef LINUXINCLUDE +@@ -100,6 +104,13 @@ auto-build: $(DRIVER_KO) + $(DRIVER): $(DRIVER_KO) + if [ $< -nt $@ ] || [ ! -e $@ ] ; then cp -f $< $@; fi + ++# Use SUBDIRS on 2.x, 3.x, 4.x. Use M on newer kernels. ++ifeq ($(filter-out 2 3 4,$(firstword $(subst ., ,$(VM_UNAME)))),) ++DIRVAR := SUBDIRS ++else ++DIRVAR := M ++endif ++ + # Pass gcc version down the chain, so we can detect if kernel attempts to use unapproved compiler + VM_CCVER := $(VMCCVER) + export VM_CCVER +@@ -117,7 +128,7 @@ prebuild:: ; + postbuild:: ; + + $(DRIVER_KO): prebuild +- $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ ++ $(MAKE) -C $(BUILD_DIR) $(DIRVAR)=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ + MODULEBUILDDIR=$(MODULEBUILDDIR) modules + $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \ + MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild --- a/vmmon/common/hostif.h +++ b/vmmon/common/hostif.h @@ -122,14 +122,10 @@ EXTERN MPN64 HostIF_GetNextAnonPage(VMDriver *vm, MPN64 mpn); @@ -849,12 +872,14 @@ /* *---------------------------------------------------------------------- -@@ -108,7 +108,9 @@ +@@ -108,7 +108,11 @@ static int LinuxDriver_Close(struct inode *inode, struct file *filp); static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait); -#if defined(VMW_NOPAGE_2624) -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) ++static vm_fault_t LinuxDriverFault(struct vm_fault *fault); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +static int LinuxDriverFault(struct vm_fault *fault); +#elif defined(VMW_NOPAGE_2624) static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault); @@ -917,13 +942,18 @@ { LinuxDriverWakeUp(FALSE); } -@@ -928,7 +934,10 @@ +@@ -928,7 +934,15 @@ *----------------------------------------------------------------------------- */ -#if defined(VMW_NOPAGE_2624) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) -+static int ++static ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0) ++vm_fault_t ++#else ++int ++#endif +LinuxDriverFault(struct vm_fault *fault) //IN/OUT +#elif defined(VMW_NOPAGE_2624) static int LinuxDriverFault(struct vm_area_struct *vma, //IN @@ -1221,6 +1251,33 @@ ret = vPgAddr | (((VA)p) & (PAGE_SIZE - 1)); +@@ -2278,7 +2345,7 @@ isVAReadable(VA r) // IN: + int ret; + + old_fs = get_fs(); +- set_fs(get_ds()); ++ set_fs(KERNEL_DS); + r = APICR_TO_ADDR(r, APICR_VERSION); + ret = HostIF_CopyFromUser(&dummy, (void*)r, sizeof(dummy)); + set_fs(old_fs); +@@ -2479,7 +2546,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN: + } + + old_fs = get_fs(); +- set_fs(get_ds()); ++ set_fs(KERNEL_DS); + + { + struct poll_wqueues table; +@@ -2608,7 +2675,7 @@ HostIF_SemaphoreSignal(uint64 *args) // IN: + } + + old_fs = get_fs(); +- set_fs(get_ds()); ++ set_fs(KERNEL_DS); + + /* + * Always write sizeof(uint64) bytes. This works fine for eventfd and @@ -2850,13 +2874,75 @@ HostIF_CallOnEachCPU(void (*func)(void*), // IN: function to call } @@ -1389,6 +1446,14 @@ /* *---------------------------------------------------------------------- +@@ -3464,7 +3477,6 @@ HostIF_SetFastClockRate(unsigned int rate) // IN: Frequency in Hz. + } + } else { + if (linuxState.fastClockThread) { +- force_sig(SIGKILL, linuxState.fastClockThread); + kthread_stop(linuxState.fastClockThread); + close_rtc(linuxState.fastClockFile, current->files); + @@ -3512,7 +3684,12 @@ ASSERT(handle); @@ -1419,170 +1484,3 @@ break; } -From 8ba37a5023f939ba8d2e0d91b916ff442b1c18dd Mon Sep 17 00:00:00 2001 -From: Michal Kubecek <mkubecek@suse.cz> -Date: Mon, 31 Dec 2018 00:05:42 +0100 -Subject: [PATCH] modules: replace SUBDIRS with M - -Since commit 0126be38d988 ("kbuild: announce removal of SUBDIRS if used") -in v5.0-rc1, using SUBDIRS when building out of tree modules produces -a deprecation warning. As M used to work since pretty much ever, use it -unconditionally. ---- - vmmon-only/Makefile | 2 +- - vmnet-only/Makefile | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile -index ccdd295..b4b71fb 100644 ---- a/vmmon-only/Makefile -+++ b/vmmon-only/Makefile -@@ -121,7 +121,7 @@ prebuild:: ; - postbuild:: ; - - $(DRIVER_KO): prebuild -- $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ -+ $(MAKE) -C $(BUILD_DIR) M=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ - MODULEBUILDDIR=$(MODULEBUILDDIR) modules - $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \ - MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild -From 41413a9b6e660a93600a438944d85b6f51eb680c Mon Sep 17 00:00:00 2001 -From: Michal Kubecek <mkubecek@suse.cz> -Date: Tue, 5 Mar 2019 13:21:35 +0100 -Subject: [PATCH] vmmon: use KERNEL_DS rather than get_ds() - -Commit 736706bee329 ("get rid of legacy 'get_ds()' function") in v5.1-rc1 -removed get_ds() helper. As this helper always returned KERNEL_DS on x86_64 -since the architecture was introduced (and even on i386, it did so since -v2.1.0), simply use KERNEL_DS regardless of kernel version. ---- - vmmon-only/linux/hostif.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c -index ef88a22..8ca17de 100644 ---- a/vmmon-only/linux/hostif.c -+++ b/vmmon-only/linux/hostif.c -@@ -2345,7 +2345,7 @@ isVAReadable(VA r) // IN: - int ret; - - old_fs = get_fs(); -- set_fs(get_ds()); -+ set_fs(KERNEL_DS); - r = APICR_TO_ADDR(r, APICR_VERSION); - ret = HostIF_CopyFromUser(&dummy, (void*)r, sizeof(dummy)); - set_fs(old_fs); -@@ -2546,7 +2546,7 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN: - } - - old_fs = get_fs(); -- set_fs(get_ds()); -+ set_fs(KERNEL_DS); - - { - struct poll_wqueues table; -@@ -2675,7 +2675,7 @@ HostIF_SemaphoreSignal(uint64 *args) // IN: - } - - old_fs = get_fs(); -- set_fs(get_ds()); -+ set_fs(KERNEL_DS); - - /* - * Always write sizeof(uint64) bytes. This works fine for eventfd and -From 48812705d760a0dc760420ce495e34ce4d019b92 Mon Sep 17 00:00:00 2001 -From: Michal Kubecek <mkubecek@suse.cz> -Date: Sat, 9 Mar 2019 11:11:29 +0100 -Subject: [PATCH] vmmon: fix return type of vm_operations_struct::fault handler - -Commit 3d3539018d2c ("mm: create the new vm_fault_t type") in mainline -5.1-rc1 changed the definition of vm_fault_t type to unsigned to catch -vm_operations_struct::fault handlers which still have int as return value. -LinuxDriverFault() in vmmon module is one of those. - -As handler return type was changed by commit 1c8f422059ae ("mm: change -return type to vm_fault_t") in 4.17-rc1, make LinuxDriverFault() always -return vm_fault_t and define vm_fault_t as int when building against -a pre-4.17 kernel. (Except for the branch for really old kernels where -the handler was vm_operations_struct::nopage and returned a pointer to -struct page.) ---- - vmmon-only/linux/driver.c | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c -index cdc7fc1..fd9fdac 100644 ---- a/vmmon-only/linux/driver.c -+++ b/vmmon-only/linux/driver.c -@@ -90,6 +90,9 @@ static Bool LinuxDriverCheckPadding(void); - tv->tv_usec = now.tv_nsec / 1000; - } - #endif -+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) -+typedef int vm_fault_t; -+#endif - - /* - *---------------------------------------------------------------------- -@@ -119,9 +122,9 @@ long LinuxDriver_Ioctl(struct file *filp, u_int iocmd, - static int LinuxDriver_Close(struct inode *inode, struct file *filp); - static unsigned int LinuxDriverPoll(struct file *file, poll_table *wait); - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) --static int LinuxDriverFault(struct vm_fault *fault); -+static vm_fault_t LinuxDriverFault(struct vm_fault *fault); - #elif defined(VMW_NOPAGE_2624) --static int LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault); -+static vm_fault_t LinuxDriverFault(struct vm_area_struct *vma, struct vm_fault *fault); - #else - static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, - unsigned long address, -@@ -949,11 +952,11 @@ LinuxDriverPollTimeout(compat_timer_arg_t unused) // IN: - */ - - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) --static int -+static vm_fault_t - LinuxDriverFault(struct vm_fault *fault) //IN/OUT - #elif defined(VMW_NOPAGE_2624) --static int LinuxDriverFault(struct vm_area_struct *vma, //IN -- struct vm_fault *fault) //IN/OUT -+static vm_fault_t LinuxDriverFault(struct vm_area_struct *vma, //IN -+ struct vm_fault *fault) //IN/OUT - #else - static struct page *LinuxDriverNoPage(struct vm_area_struct *vma, //IN - unsigned long address, //IN -From d20641f619bd3766cf5b50b2c750700eab189bd9 Mon Sep 17 00:00:00 2001 -From: Michal Kubecek <mkubecek@suse.cz> -Date: Tue, 9 Jul 2019 21:07:04 +0200 -Subject: [PATCH] vmmon: fix HostIF_SetFastClockRate() not to use force_sig() - -Commit 3cf5d076fb4d ("signal: Remove task parameter from force_sig") in -v5.3-rc1 drops second argument of force_sig(); before that, all callers -which passed something else than current task as second argument were -fixed, mostly to use send_sig() instead. - -The situation in HostIF_SetFastClockRate() is the same as e.g. in bpfilter -call fixed by commit 1dfd1711de29 ("signal/bpfilter: Fix bpfilter_kernl to -use send_sig not force_sig"): locking in force_sig_info() cannot handle -task exiting and using force_sig() for SIGKILL is pointless anyway as this -signal cannot be blocked. - -As send_sig() is present with unchanged signature since the pre-git era, we -can use send_sig() unconditionally, regardless of kernel version. ---- - vmmon-only/linux/hostif.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c -index 210f281..4da863b 100644 ---- a/vmmon-only/linux/hostif.c -+++ b/vmmon-only/linux/hostif.c -@@ -3636,7 +3636,7 @@ HostIF_SetFastClockRate(unsigned int rate) // IN: Frequency in Hz. - } - } else { - if (linuxState.fastClockThread) { -- force_sig(SIGKILL, linuxState.fastClockThread); -+ send_sig(SIGKILL, linuxState.fastClockThread, 1); - kthread_stop(linuxState.fastClockThread); - close_rtc(linuxState.fastClockFile, current->files); - diff --git a/vmnet.patch b/vmnet.patch index a6e65d7cfc45..444c08f5525e 100644 --- a/vmnet.patch +++ b/vmnet.patch @@ -12,6 +12,29 @@ # Header directory for the running kernel ifdef LINUXINCLUDE +@@ -100,6 +104,13 @@ auto-build: $(DRIVER_KO) + $(DRIVER): $(DRIVER_KO) + if [ $< -nt $@ ] || [ ! -e $@ ] ; then cp -f $< $@; fi + ++# Use SUBDIRS on 2.x, 3.x, 4.x. Use M on newer kernels. ++ifeq ($(filter-out 2 3 4,$(firstword $(subst ., ,$(VM_UNAME)))),) ++DIRVAR := SUBDIRS ++else ++DIRVAR := M ++endif ++ + # Pass gcc version down the chain, so we can detect if kernel attempts to use unapproved compiler + VM_CCVER := $(VMCCVER) + export VM_CCVER +@@ -117,7 +128,7 @@ prebuild:: ; + postbuild:: ; + + $(DRIVER_KO): prebuild +- $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ ++ $(MAKE) -C $(BUILD_DIR) $(DIRVAR)=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ + MODULEBUILDDIR=$(MODULEBUILDDIR) modules + $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \ + MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild --- a/vmnet/bridge.c +++ b/vmnet/bridge.c @@ -636,7 +636,7 @@ @@ -164,30 +187,3 @@ # define compat_sk_alloc(_bri, _pri) sk_alloc(&init_net, \ PF_NETLINK, _pri, &vmnet_proto, 1) #elif defined(VMW_NETDEV_HAS_NET) -From 8ba37a5023f939ba8d2e0d91b916ff442b1c18dd Mon Sep 17 00:00:00 2001 -From: Michal Kubecek <mkubecek@suse.cz> -Date: Mon, 31 Dec 2018 00:05:42 +0100 -Subject: [PATCH] modules: replace SUBDIRS with M - -Since commit 0126be38d988 ("kbuild: announce removal of SUBDIRS if used") -in v5.0-rc1, using SUBDIRS when building out of tree modules produces -a deprecation warning. As M used to work since pretty much ever, use it -unconditionally. ---- - vmmon-only/Makefile | 2 +- - vmnet-only/Makefile | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile -index caab6b9..c2fc51f 100644 ---- a/vmnet-only/Makefile -+++ b/vmnet-only/Makefile -@@ -121,7 +121,7 @@ prebuild:: ; - postbuild:: ; - - $(DRIVER_KO): prebuild -- $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ -+ $(MAKE) -C $(BUILD_DIR) M=$$PWD SRCROOT=$$PWD/$(SRCROOT) \ - MODULEBUILDDIR=$(MODULEBUILDDIR) modules - $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \ - MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild diff --git a/bootstrap b/vmware-bootstrap index 981b82191cca..981b82191cca 100644 --- a/bootstrap +++ b/vmware-bootstrap |