summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD21
-rw-r--r--efi-unlocker-patch-1.0.0.txt25
-rw-r--r--vmmon.patch145
4 files changed, 63 insertions, 133 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 35e0758bdc88..86d4c2bf78a9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vmware-workstation14
pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC.
pkgver = 14.1.7
- pkgrel = 11
+ pkgrel = 12
url = https://www.vmware.com/products/workstation-for-linux.html
install = vmware-workstation.install
arch = x86_64
@@ -18,6 +18,7 @@ pkgbase = vmware-workstation14
depends = hicolor-icon-theme
depends = fontconfig
depends = freetype2
+ depends = harfbuzz
depends = vmware-keymaps
optdepends = linux-headers: build modules against Arch kernel
provides = vmware-workstation=14.1.7
@@ -86,7 +87,7 @@ pkgbase = vmware-workstation14
sha256sums = fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d
sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e
sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac
- sha256sums = 078dc018bab0cb115e610a19ddd85778664cda6a0878bac8f65a4615d35db279
+ sha256sums = 161720a88406a8ca4e6aa3920f291ad43ac0c94d068c3ea1b893cc3fb99ca6de
sha256sums = 2cb7e37a807db07cff3e0eb833c05e306f3d4a8c198ddddf8e3f7492750c10bd
pkgname = vmware-workstation14
diff --git a/PKGBUILD b/PKGBUILD
index 973381d7cc6e..594c909bcc2a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ pkgname=vmware-workstation14
pkgver=14.1.7
_buildver=12989993
_pkgver=${pkgver}_${_buildver}
-pkgrel=11
+pkgrel=12
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'
@@ -46,6 +46,7 @@ depends=(
# needed to replace internal libs:
fontconfig
freetype2
+ harfbuzz
)
optdepends=(
'linux-headers: build modules against Arch kernel'
@@ -123,7 +124,7 @@ sha256sums=(
'10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e'
'273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac'
- '078dc018bab0cb115e610a19ddd85778664cda6a0878bac8f65a4615d35db279'
+ '161720a88406a8ca4e6aa3920f291ad43ac0c94d068c3ea1b893cc3fb99ca6de'
'2cb7e37a807db07cff3e0eb833c05e306f3d4a8c198ddddf8e3f7492750c10bd'
)
options=(!strip emptydirs)
@@ -141,8 +142,7 @@ if [ -n "$_enable_macOS_guests" ]; then
_vmware_fusion_ver=10.1.6_12989998
# List of VMware Fusion versions: https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/
-_unlocker_ver=3.0.3
-_efi_unlocker_ver=1.0.0
+_unlocker_ver=3.0.6
makedepends+=(
python
@@ -153,13 +153,13 @@ makedepends+=(
source+=(
"darwinPre15-tools-${_vmware_fusion_ver}.zip.tar::https://softwareupdate.vmware.com/cds/vmw-desktop/fusion/${_vmware_fusion_ver/_//}/packages/com.vmware.fusion.tools.darwinPre15.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-${_unlocker_ver}.py::https://raw.githubusercontent.com/paolo-projects/unlocker/${_unlocker_ver}/unlocker.py"
- "efi-unlocker-patch-${_efi_unlocker_ver}.txt"
+ "unlocker-${_unlocker_ver}.py::https://raw.githubusercontent.com/DrDonk/unlocker/v${_unlocker_ver}/unlocker.py"
+ "efi-patches-${_unlocker_ver}.txt::https://raw.githubusercontent.com/DrDonk/unlocker/v${_unlocker_ver}/uefipatch/efi-patches.txt"
)
sha256sums+=(
'195313791f2c2cf880b0ba6c9d130e40ab6729335c0980fcc40df4209c1ed52b'
'e36fb99a56a65d2c4d82168c8adb1ed19a9a7aaf75807c667c79a79f4968740a'
- '1c27547dcf6fb2f436c96ee62ae8c7f5cfd14b40d8bbd35dc385e247c4fb7e0f'
+ '8a61e03d0edbbf60c1c84a43aa87a6e950f82d2c71b968888f019345c2f684f3'
'392c1effcdec516000e9f8ffc97f2586524d8953d3e7d6f2c5f93f2acd809d91'
)
@@ -447,7 +447,7 @@ fi
if [ -n "$_enable_macOS_guests" ]; then
msg "Patching VMware to enable macOS guest support"
- python "$srcdir/unlocker-${_unlocker_ver}.py" > /dev/null
+ python3 "$srcdir/unlocker-${_unlocker_ver}.py" > /dev/null
for isoimage in ${_fusion_isoimages[@]}
do
@@ -459,7 +459,7 @@ if [ -n "$_enable_macOS_guests" ]; then
_efi_arch=(32 64)
for arch in ${_efi_arch[@]}
do
- uefipatch "$pkgdir/usr/lib/vmware/roms/EFI${arch}.ROM" "$srcdir/efi-unlocker-patch-${_efi_unlocker_ver}.txt" -o "$pkgdir/usr/lib/vmware/roms/EFI${arch}.ROM" > /dev/null
+ uefipatch "$pkgdir/usr/lib/vmware/roms/EFI${arch}.ROM" "$srcdir/efi-patches-${_unlocker_ver}.txt" -o "$pkgdir/usr/lib/vmware/roms/EFI${arch}.ROM" > /dev/null
done
fi
@@ -481,4 +481,7 @@ fi
# 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/"
+
+ # to solve bugs with incompatibles library versions:
+ ln -sf /usr/lib/libharfbuzz.so.0 "$pkgdir/usr/lib/vmware/lib/libharfbuzz.so.0/"
}
diff --git a/efi-unlocker-patch-1.0.0.txt b/efi-unlocker-patch-1.0.0.txt
deleted file mode 100644
index 6451d1db0315..000000000000
--- a/efi-unlocker-patch-1.0.0.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Patch string format
-# FileGuid SectionType PatchType:FindPatternOrOffset:ReplacePattern
-# Please ensure that the latest symbol in patch string is space
-
-# Possible section types:
-# PE32 image 10
-# Position-independent code 11
-# TE Image 12
-# DXE Dependency 13
-# Version information 14
-# User interface string 15
-# 16-bit code 16
-# Guided freeform 18
-# Raw data 19
-# PEI Dependency 1B
-# SMM Dependency 1C
-# Please do not try another section types, it can make the resulting image broken
-
-# Possible patch types:
-# P - pattern-based, first parameter is a pattern to find, second - a pattern to replace
-# O - offset-based, first parameter is hexadecimal offset, second - a pattern to replace
-# Patterns can have . as "any possible value" symbol
-
-# VMware remove macOS Server check ServerVersion.plist -> SystemVersion.plist
-961578FE-B6B7-44C3-AF35-6BC705CD3B3F 10 P:530065007200760065007200560065007200730069006F006E002E0070006C00690073007400:530079007300740065006D00560065007200730069006F006E002E0070006C00690073007400
diff --git a/vmmon.patch b/vmmon.patch
index 39ffa227bcc4..dbe647f0d05e 100644
--- a/vmmon.patch
+++ b/vmmon.patch
@@ -81,6 +81,29 @@
#include "vmware.h"
#include "x86apic.h"
+@@ -79,6 +82,13 @@
+ #error CONFIG_HIGH_RES_TIMERS required for acceptable performance
+ #endif
+
++/* task's state is read-once rather than volatile from 5.14-rc2. */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) || defined(get_current_state)
++#define get_task_state(task) READ_ONCE((task)->__state)
++#else
++#define get_task_state(task) ((task)->state)
++#endif
++
+ /*
+ * Although this is not really related to kernel-compatibility, I put this
+ * helper macro here for now for a lack of better place --hpreg
+@@ -442,7 +452,7 @@
+ while ((vcpuid = VCPUSet_FindFirst(&req)) != VCPUID_INVALID) {
+ struct task_struct *t = vm->vmhost->vcpuSemaTask[vcpuid];
+ VCPUSet_Remove(&req, vcpuid);
+- if (t && (t->state & TASK_INTERRUPTIBLE)) {
++ if (t && (get_task_state(t) & TASK_INTERRUPTIBLE)) {
+ wake_up_process(t);
+ }
+ }
@@ -593,6 +596,15 @@ HostIF_FastClockUnlock(int callerID) //
MutexUnlock(&fastClockMutex, callerID);
}
@@ -286,7 +309,7 @@
int res;
int waitFD = args[0];
int timeoutms = args[2];
-@@ -2364,9 +2449,6 @@ HostIF_SemaphoreWait(VMDriver *vm, //
+@@ -2364,22 +2449,19 @@ HostIF_SemaphoreWait(VMDriver *vm, //
return MX_WAITERROR;
}
@@ -296,6 +319,21 @@
{
struct poll_wqueues table;
unsigned int mask;
+
+ poll_initwait(&table);
+- current->state = TASK_INTERRUPTIBLE;
++ __set_current_state(TASK_INTERRUPTIBLE);
+ mask = file->f_op->poll(file, &table.pt);
+ if (!(mask & (POLLIN | POLLERR | POLLHUP))) {
+ vm->vmhost->vcpuSemaTask[vcpuid] = current;
+ schedule_timeout(timeoutms * HZ / 1000); // convert to Hz
+ vm->vmhost->vcpuSemaTask[vcpuid] = NULL;
+ }
+- current->state = TASK_RUNNING;
++ __set_current_state(TASK_RUNNING);
+ poll_freewait(&table);
+ }
+
@@ -2388,9 +2470,11 @@ HostIF_SemaphoreWait(VMDriver *vm, //
* the code to happily deal with a pipe or an eventfd. We only care about
* reading no bytes (EAGAIN - non blocking fd) or sizeof(uint64).
@@ -319,6 +357,15 @@
fput(file);
/*
+@@ -2452,7 +2542,7 @@
+ FOR_EACH_VCPU_IN_SET(vcs, vcpuid) {
+ struct task_struct *t = vm->vmhost->vcpuSemaTask[vcpuid];
+ vm->vmhost->vcpuSemaTask[vcpuid] = NULL;
+- if (t && (t->state & TASK_INTERRUPTIBLE)) {
++ if (t && (get_task_state(t) & TASK_INTERRUPTIBLE)) {
+ wake_up_process(t);
+ }
+ } ROF_EACH_VCPU_IN_SET();
@@ -2482,8 +2565,8 @@ HostIF_SemaphoreForceWakeup(VMDriver *vm
int
HostIF_SemaphoreSignal(uint64 *args) // IN:
@@ -411,99 +458,3 @@
printk(KERN_ERR "%s: Couldn't verify write to uva 0x%p with size %"
FMTSZ"u\n", __func__, p, size);
-From 9fda02bce13527ce94a95df1a98fb6188dea22b8 Mon Sep 17 00:00:00 2001
-From: Michal Kubecek <mkubecek@suse.cz>
-Date: Wed, 30 Jun 2021 11:05:16 +0200
-Subject: [PATCH] vmmon: fix task_struct::state access patterns
-
-Mainline commit 2f064a59a11f ("sched: Change task_struct::state") in
-5.14-rc1 finishes a series fixing racy access patterns to task state and
-renames task_struct::state to __state so that code old code acessing it
-directly fails to build.
-
-Two of these in HostIF_SemaphoreWait() can be rewritten into calls to
-set_current_state() unconditionally (second one may do with
-__set_current_state() but I don't feel confident enough about that).
-There are also two places where vmmon code reads task_struct::state;
-provide a compat accessor using READ_ONCE() and use it instead of
-a direct read. To avoid kernel version check, check presence of
-get_current_state() macro introduced in the same commit as state member
-rename.
----
- vmmon-only/include/compat_sched.h | 15 +++++++++++++++
- vmmon-only/linux/hostif.c | 10 ++++++----
- 2 files changed, 21 insertions(+), 4 deletions(-)
-
-diff --git a/vmmon-only/include/compat_sched.h b/vmmon-only/include/compat_sched.h
-index 3f3304b..72078e0 100644
---- a/vmmon-only/include/compat_sched.h
-+++ b/vmmon-only/include/compat_sched.h
-@@ -289,5 +289,20 @@ typedef struct pid * compat_pid;
- #define compat_kill_pid(pid, sig, flag) kill_pid(pid, sig, flag)
- #endif
-
-+/*
-+ * Since v5.14-rc1, task_struct::state hase been renamed to __state and is
-+ * is longer supposed to be accessed without READ_ONCE/WRITE_ONCE.
-+ */
-+#ifdef get_current_state
-+static inline int compat_get_task_state(const struct task_struct *t)
-+{
-+ return READ_ONCE(t->__state);
-+}
-+#else
-+static inline int compat_get_task_state(const struct task_struct *t)
-+{
-+ return READ_ONCE(t->state);
-+}
-+#endif
-
- #endif /* __COMPAT_SCHED_H__ */
-diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
-index 137062c..6910f69 100644
---- a/vmmon-only/linux/hostif.c
-+++ b/vmmon-only/linux/hostif.c
-@@ -78,6 +78,8 @@
- #include "pgtbl.h"
- #include "versioned_atomic.h"
-
-+#include "compat_sched.h"
-+
- #if !defined(CONFIG_HIGH_RES_TIMERS)
- #error CONFIG_HIGH_RES_TIMERS required for acceptable performance
- #endif
-@@ -445,7 +447,7 @@ HostIF_WakeUpYielders(VMDriver *vm, // IN:
- while ((vcpuid = VCPUSet_FindFirst(&req)) != VCPUID_INVALID) {
- struct task_struct *t = vm->vmhost->vcpuSemaTask[vcpuid];
- VCPUSet_Remove(&req, vcpuid);
-- if (t && (t->state & TASK_INTERRUPTIBLE)) {
-+ if (t && (compat_get_task_state(t) & TASK_INTERRUPTIBLE)) {
- wake_up_process(t);
- }
- }
-@@ -2454,14 +2456,14 @@ HostIF_SemaphoreWait(VMDriver *vm, // IN:
- unsigned int mask;
-
- poll_initwait(&table);
-- current->state = TASK_INTERRUPTIBLE;
-+ set_current_state(TASK_INTERRUPTIBLE);
- mask = file->f_op->poll(file, &table.pt);
- if (!(mask & (POLLIN | POLLERR | POLLHUP))) {
- vm->vmhost->vcpuSemaTask[vcpuid] = current;
- schedule_timeout(timeoutms * HZ / 1000); // convert to Hz
- vm->vmhost->vcpuSemaTask[vcpuid] = NULL;
- }
-- current->state = TASK_RUNNING;
-+ set_current_state(TASK_RUNNING);
- poll_freewait(&table);
- }
-
-@@ -2535,7 +2537,7 @@ HostIF_SemaphoreForceWakeup(VMDriver *vm, // IN:
- FOR_EACH_VCPU_IN_SET(vcs, vcpuid) {
- struct task_struct *t = vm->vmhost->vcpuSemaTask[vcpuid];
- vm->vmhost->vcpuSemaTask[vcpuid] = NULL;
-- if (t && (t->state & TASK_INTERRUPTIBLE)) {
-+ if (t && (compat_get_task_state(t) & TASK_INTERRUPTIBLE)) {
- wake_up_process(t);
- }
- } ROF_EACH_VCPU_IN_SET();