aboutsummaryrefslogtreecommitdiff
path: root/emulators/vmware3
diff options
context:
space:
mode:
authorTatsumi Hosokawa <hosokawa@FreeBSD.org>2001-06-07 15:18:33 +0000
committerTatsumi Hosokawa <hosokawa@FreeBSD.org>2001-06-07 15:18:33 +0000
commit34765bae7402189997b83b52b63e086dea3d8358 (patch)
treedaa8ee3792c2853bf1ed3691182c17fa316fc0d2 /emulators/vmware3
parentb8d980786d94784cc75b307232c676991fd9cc2b (diff)
downloadports-34765bae7402189997b83b52b63e086dea3d8358.tar.gz
ports-34765bae7402189997b83b52b63e086dea3d8358.zip
Notes
Diffstat (limited to 'emulators/vmware3')
-rw-r--r--emulators/vmware3/files/patch-be63
1 files changed, 63 insertions, 0 deletions
diff --git a/emulators/vmware3/files/patch-be b/emulators/vmware3/files/patch-be
new file mode 100644
index 000000000000..0f1463f0bf84
--- /dev/null
+++ b/emulators/vmware3/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;