aboutsummaryrefslogtreecommitdiffstats
path: root/emulators/vmware2
diff options
context:
space:
mode:
authorhosokawa <hosokawa@FreeBSD.org>2001-06-07 23:18:33 +0800
committerhosokawa <hosokawa@FreeBSD.org>2001-06-07 23:18:33 +0800
commit022f6f8170a2b4b1ecb50bdd3c7f5876e12d9f50 (patch)
treeab581529f698c95b80358c42c6f69ab113bdf49c /emulators/vmware2
parentf19f0cde3b62a726448edbb9dc235e54ae5cb123 (diff)
downloadfreebsd-ports-gnome-022f6f8170a2b4b1ecb50bdd3c7f5876e12d9f50.tar.gz
freebsd-ports-gnome-022f6f8170a2b4b1ecb50bdd3c7f5876e12d9f50.tar.zst
freebsd-ports-gnome-022f6f8170a2b4b1ecb50bdd3c7f5876e12d9f50.zip
Latest mutex fix was imcomplete and vmware2 port still hangs at vmmon
kernel module. Added mutex code before and after calling vm operations in vmmon. Submitted by: John Baldwin <jhb@FreeBSD.org> Approved by: the Maintainer
Diffstat (limited to 'emulators/vmware2')
-rw-r--r--emulators/vmware2/files/patch-be63
1 files changed, 63 insertions, 0 deletions
diff --git a/emulators/vmware2/files/patch-be b/emulators/vmware2/files/patch-be
new file mode 100644
index 000000000000..0f1463f0bf84
--- /dev/null
+++ b/emulators/vmware2/files/patch-be
@@ -0,0 +1,63 @@
+--- vmmon-only/freebsd/hostif.c.orig Wed Jun 6 22:49:52 2001
++++ vmmon-only/freebsd/hostif.c Thu Jun 7 13:13:02 2001
+@@ -107,7 +107,13 @@
+
+ paddr = (vm_offset_t)addr;
+ m = PHYS_TO_VM_PAGE(paddr);
++#if __FreeBSD_version >= 500013
++ mtx_lock(&vm_mtx);
++#endif
+ vm_page_wire(m);
++#if __FreeBSD_version >= 500013
++ mtx_unlock(&vm_mtx);
++#endif
+ return 0;
+ }
+
+@@ -120,7 +126,13 @@
+
+ paddr = (vm_offset_t)addr;
+ m = PHYS_TO_VM_PAGE(paddr);
++#if __FreeBSD_version >= 500013
++ mtx_lock(&vm_mtx);
++#endif
+ vm_page_unwire(m, 1);
++#if __FreeBSD_version >= 500013
++ mtx_unlock(&vm_mtx);
++#endif
+ return 0;
+ }
+
+@@ -1066,10 +1078,16 @@
+ return NULL;
+ }
+ paddr = vtophys(addr);
++#if __FreeBSD_version >= 500013
++ mtx_lock(&vm_mtx);
++#endif
+ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE);
+ ka->map = PHYS_TO_VM_PAGE(paddr);
+ vm_page_wire(ka->map);
+ pmap_kenter(ka->kaddr, paddr);
++#if __FreeBSD_version >= 500013
++ mtx_unlock(&vm_mtx);
++#endif
+ return ka->kaddr;
+ }
+
+@@ -1079,9 +1097,15 @@
+ if (ka->map==NULL)
+ return 0;
+
++#if __FreeBSD_version >= 500013
++ mtx_lock(&vm_mtx);
++#endif
+ vm_page_unwire(ka->map, 1);
+ pmap_kremove(ka->kaddr);
+ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE);
++#if __FreeBSD_version >= 500013
++ mtx_unlock(&vm_mtx);
++#endif
+ ka->kaddr = 0;
+ ka->map = NULL;
+ return 0;