summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2021-10-15 16:39:47 +0200
committerJean-Marc Lenoir2021-10-15 16:39:47 +0200
commitcad65ee632ec21b428c14c9df5619307f8ef83f7 (patch)
tree7d78d16657d0aedd97f631443163f92cde32b6b0
parent737c35a909af0bdabc6ebc6a62a0ed85b9e85758 (diff)
downloadaur-cad65ee632ec21b428c14c9df5619307f8ef83f7.tar.gz
Sync with vmware-workstation 16.2.0
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD17
-rw-r--r--efi-unlocker-patch-1.0.0.txt25
-rw-r--r--vmmon.patch147
4 files changed, 59 insertions, 134 deletions
diff --git a/.SRCINFO b/.SRCINFO
index baf3639ee91..fdd41342fa3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = vmware-workstation12
pkgdesc = The industry standard for running multiple operating systems as virtual machines on a single Linux PC.
pkgver = 12.5.9
- pkgrel = 18
+ pkgrel = 19
url = https://www.vmware.com/products/workstation-for-linux.html
install = vmware-workstation.install
arch = x86_64
@@ -84,7 +84,7 @@ pkgbase = vmware-workstation12
sha256sums = fe1b1be8297f4170406f97dd1f8b385d911faf45afe19cbc0c26b8092b3ddf8d
sha256sums = 10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e
sha256sums = 273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac
- sha256sums = 3226511f49ddaf9d413ece46291717058b9286b94038fa4986111e5c234bf2ae
+ sha256sums = 9ba0c4f87196f922cadc14bf8674b707c7d1fc7dc1eccfb2d5d847870e1c5398
sha256sums = ba069b2d5b7a81d3648991444cf67945e31cab061dc089e5c44c78a37058d080
pkgname = vmware-workstation12
diff --git a/PKGBUILD b/PKGBUILD
index d6132e11866..b79fe99bca0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ pkgname=vmware-workstation12
pkgver=12.5.9
_buildver=7535481
_pkgver=${pkgver}_${_buildver}
-pkgrel=18
+pkgrel=19
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'
@@ -121,7 +121,7 @@ sha256sums=(
'10562d11d50edab9abc2b29c8948714edcb9b084f99b3766d07ddd21259e372e'
'273d4357599a3e54259c78cc49054fef8ecfd2c2eda35cbcde3a53a62777a5ac'
- '3226511f49ddaf9d413ece46291717058b9286b94038fa4986111e5c234bf2ae'
+ '9ba0c4f87196f922cadc14bf8674b707c7d1fc7dc1eccfb2d5d847870e1c5398'
'ba069b2d5b7a81d3648991444cf67945e31cab061dc089e5c44c78a37058d080'
)
options=(!strip emptydirs)
@@ -139,8 +139,7 @@ if [ -n "$_enable_macOS_guests" ]; then
_vmware_fusion_ver=8.5.10_7527438
# 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
@@ -151,13 +150,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+=(
'78aaa6ba65d178d6242ad73b7e2e552ec707798ce5f4925a0adebf30f844dc17'
'6327a76c2503f56d8bc67279f289ed4bb53e236d965ad78c0fcf7ee9e2bbb6c6'
- '1c27547dcf6fb2f436c96ee62ae8c7f5cfd14b40d8bbd35dc385e247c4fb7e0f'
+ '8a61e03d0edbbf60c1c84a43aa87a6e950f82d2c71b968888f019345c2f684f3'
'392c1effcdec516000e9f8ffc97f2586524d8953d3e7d6f2c5f93f2acd809d91'
)
@@ -448,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
@@ -463,7 +462,7 @@ if [ -n "$_enable_macOS_guests" ]; then
objcopy "$pkgdir"/usr/lib/vmware/bin/vmware-vmx -O binary -j efi${arch} --set-section-flags efi${arch}=a efi${arch}.rom.Z
perl -e 'use Compress::Zlib; my $v; read STDIN, $v, '$(stat -c%s "./efi${arch}.rom.Z")'; $v = uncompress($v); print $v;' < efi${arch}.rom.Z > efi${arch}.rom
- uefipatch efi${arch}.rom "$srcdir/efi-unlocker-patch-${_efi_unlocker_ver}.txt" -o efi${arch}.rom > /dev/null
+ uefipatch efi${arch}.rom "$srcdir/efi-patches-${_unlocker_ver}.txt" -o efi${arch}.rom > /dev/null
perl -e 'use Compress::Zlib; my $v; read STDIN, $v, '$(stat -c%s "./efi${arch}.rom")'; $v = compress($v); print $v;' < efi${arch}.rom > efi${arch}.rom.Z
objcopy "$pkgdir"/usr/lib/vmware/bin/vmware-vmx --update-section efi${arch}=efi${arch}.rom.Z
diff --git a/efi-unlocker-patch-1.0.0.txt b/efi-unlocker-patch-1.0.0.txt
deleted file mode 100644
index 6451d1db031..00000000000
--- 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 5a91f14ea1d..6e2577b36f7 100644
--- a/vmmon.patch
+++ b/vmmon.patch
@@ -178,6 +178,29 @@
#include "vmware.h"
#include "x86apic.h"
+@@ -118,6 +121,13 @@
+ # define close_rtc(filp, files) filp_close(filp, files)
+ #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
++
+ #define UPTIME_FREQ CONST64(1000000)
+
+ /*
+@@ -477,7 +487,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);
+ }
+ }
@@ -629,6 +632,15 @@ HostIF_FastClockUnlock(int callerID) //
MutexUnlock(&fastClockMutex, callerID);
}
@@ -461,7 +484,7 @@
int res;
int waitFD = args[0];
int timeoutms = args[2];
-@@ -2451,9 +2545,6 @@ HostIF_SemaphoreWait(VMDriver *vm, //
+@@ -2451,22 +2545,19 @@ HostIF_SemaphoreWait(VMDriver *vm, //
return MX_WAITERROR;
}
@@ -471,6 +494,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);
+ }
+
@@ -2475,9 +2566,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).
@@ -494,7 +532,16 @@
fput(file);
/*
-@@ -2569,8 +2661,8 @@ HostIF_SemaphoreForceWakeup(VMDriver *vm
+@@ -2539,7 +2638,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();
+@@ -2569,8 +2668,8 @@ HostIF_SemaphoreForceWakeup(VMDriver *vm
int
HostIF_SemaphoreSignal(uint64 *args) // IN:
{
@@ -586,99 +633,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
-@@ -102,6 +102,8 @@
- #include "vmmonInt.h"
- #include "versioned_atomic.h"
-
-+#include "compat_sched.h"
-+
- /*
- * Determine if we can use high resolution timers.
- */
-@@ -480,7 +482,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);
- }
- }
-@@ -2550,14 +2552,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);
- }
-
-@@ -2631,7 +2633,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();