Subject: Re: HEADS UP: Package removal candidates
To: None <tech-pkg@NetBSD.org, jdolecek@NetBSD.org>
From: Bernd Ernesti <netbsd@lists.veego.de>
List: tech-pkg
Date: 12/07/2005 07:21:06
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Dec 06, 2005 at 07:52:42PM -0500, Greg Troxel wrote:
> emulators/vmware-module tech-pkg
>
> I've been thinking about trying to fix this occasionally for a year or
> so. If fixed (and I suspect it's not hard), I'm afraid it's only for
> vmware3. Still, it's unfortunate that one can't run vmware on NetBSD.
vmware is 2.x, not 3. The 3.x is vmware-module3, which is also broken.
For vmware-module3 there is even a pr open with some patches, it is assigend to
the maintainer jdolecek, but nothing happens.
I'm going to commit the following patches by Saturday if I hear nothing
from jdolecek by that time.
And yes, the 2.x should be removed.
> So, I think it's better to leave it (perhaps marked broken) in the
> hopes that someone will do the work. But perhaps everyone is working
> on qemu instead.
What we would need is a package for vmware 5.5.
Bernd
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ac
$NetBSD$
--- source/vmmon/netbsd/drv.c.orig 2004-12-07 22:06:47.000000000 +0100
+++ source/vmmon/netbsd/drv.c
@@ -426,7 +426,11 @@ vmmon_alloc_low_pages(struct vmx86_softc
/*
* Map the segment into wired kernel virtual memory.
*/
+#if __NetBSD_Version__ >= 399000300
+ va = uvm_km_alloc(kernel_map, numPages * PAGE_SIZE, 0, UVM_KMF_VAONLY);
+#else
va = uvm_km_valloc(kernel_map, numPages * PAGE_SIZE);
+#endif
if (va == 0) {
VMDEBUG("vmmon_alloc_low_pages: km_valloc failed\n");
goto bad;
@@ -496,7 +500,15 @@ vmmon_destroy_low_pages(MemRange *r)
/*
* Unmap the kernel virtual memory used by this range.
*/
+#if __NetBSD_Version__ >= 399000300
+ pmap_remove(pmap_kernel(), (vaddr_t)r->kAddr,
+ (vaddr_t)r->kAddr + r->numPages * PAGE_SIZE);
+ pmap_update(pmap_kernel());
+ uvm_km_free(kernel_map, (vaddr_t)r->kAddr, r->numPages * PAGE_SIZE,
+ UVM_KMF_VAONLY);
+#else
uvm_km_free(kernel_map, (vaddr_t)r->kAddr, r->numPages * PAGE_SIZE);
+#endif
/*
* Build a list of pages to free back to the VM system.
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ad
$NetBSD$
--- source/vmmon/netbsd/host.c.orig 2003-10-09 20:38:04.000000000 +0200
+++ source/vmmon/netbsd/host.c
@@ -656,7 +656,12 @@ HostIF_UserToDriverPtr(VMDriver *vm, //
VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE);
uaddr = (vaddr_t)addr;
+#if __NetBSD_Version__ >= 399000300
+ kvaddr = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+#else
kvaddr = uvm_km_valloc_wait(kernel_map, PAGE_SIZE);
+#endif
pmap_extract(vm_map_pmap(&curproc->p_vmspace->vm_map), uaddr, &paddr);
pmap_kenter_pa(kvaddr, paddr,
VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE);
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-ae
$NetBSD$
--- source/vmnet/if_hubmod.c.orig 2004-12-07 22:06:47.000000000 +0100
+++ source/vmnet/if_hubmod.c
@@ -433,7 +433,12 @@ port_mappoll(struct hubport_softc *ports
off = uaddr - upage;
if (off > (PAGE_SIZE - sizeof(u_int32_t)))
return EINVAL;
+#if __NetBSD_Version__ >= 399000300
+ kpage = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
+ UVM_KMF_VAONLY | UVM_KMF_WAITVA);
+#else
kpage = uvm_km_valloc_wait(kernel_map, PAGE_SIZE);
+#endif
kaddr = kpage + off;
PHOLD(CURLWP);
@@ -456,7 +461,11 @@ port_mappoll(struct hubport_softc *ports
err:
PRELE(CURLWP);
+#if __NetBSD_Version__ >= 399000300
+ uvm_km_free(kernel_map, kpage, PAGE_SIZE, UVM_KMF_VAONLY);
+#else
uvm_km_free_wakeup(kernel_map, kpage, PAGE_SIZE);
+#endif
return (error);
}
@@ -467,7 +476,12 @@ port_unmappoll(struct hubport_softc *por
#if 1
pmap_update(pmap_kernel());
#endif
+#if __NetBSD_Version__ >= 399000300
+ uvm_km_free(kernel_map, portsc->port_kpollpage, PAGE_SIZE,
+ UVM_KMF_VAONLY);
+#else
uvm_km_free_wakeup(kernel_map, portsc->port_kpollpage, PAGE_SIZE);
+#endif
PHOLD(CURLWP);
uvm_vsunlock(curproc, (void *)portsc->port_upollpage, PAGE_SIZE);
PRELE(CURLWP);
--pf9I7BMVVzbSWLtt--