NetBSD Problem Report #29943

From hannken@eis.cs.tu-bs.de  Mon Apr 11 10:26:40 2005
Return-Path: <hannken@eis.cs.tu-bs.de>
Received: from bseis.eis.cs.tu-bs.de (bseis.eis.cs.tu-bs.de [134.169.33.1])
	by narn.netbsd.org (Postfix) with ESMTP id F3E3B63B116
	for <gnats-bugs@gnats.netbsd.org>; Mon, 11 Apr 2005 10:26:37 +0000 (UTC)
Message-Id: <200504111026.j3BAQZ79024779@watcher.eis.cs.tu-bs.de>
Date: Mon, 11 Apr 2005 12:26:35 +0200 (MEST)
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
Reply-To: hannken@eis.cs.tu-bs.de
To: gnats-bugs@netbsd.org
Subject: vmware-module3 fails to compile - patch included
X-Send-Pr-Version: 3.95

>Number:         29943
>Category:       pkg
>Synopsis:       vmware-module3 fails to compile - patch included
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    veego
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 11 10:27:00 +0000 2005
>Closed-Date:    Mon Mar 27 18:41:11 +0000 2006
>Last-Modified:  Mon Mar 27 18:41:11 +0000 2006
>Originator:     Juergen Hannken-Illjes
>Release:        NetBSD 3.99.3
>Organization:
>Environment:
Architecture: i386
Machine: i386
>Description:
	emulators/vmware-module3 needs update for yamt-km branch.
>How-To-Repeat:
>Fix:
	These three patches work for me.
====
Patch patchab
--- 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.
====
Patch patchac
--- 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);
====
Patch patchad
--- 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);

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->jdolecek
Responsible-Changed-By: cube@netbsd.org
Responsible-Changed-When: Mon, 11 Apr 2005 19:39:02 +0000
Responsible-Changed-Why:
jdolecek is the maintainer.


Responsible-Changed-From-To: jdolecek->veego
Responsible-Changed-By: veego@netbsd.org
Responsible-Changed-When: Tue, 21 Mar 2006 20:45:12 +0000
Responsible-Changed-Why:
I take this pr, because nothing changed in the last 11 months with it.
This changes, and some additional ones where commited to othersrc/vmware-modules.
What is left is to create a new tar file, some changes to the vmware3
package so it works during a shutdown of a VM and a new suse91_vmware
package to support the suse91 libraries.


From: Bernd Ernesti <veego@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/29943 CVS commit: pkgsrc/emulators/vmware-module3
Date: Sun, 26 Mar 2006 21:34:51 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	veego
 Date:		Sun Mar 26 21:34:51 UTC 2006

 Modified Files:
 	pkgsrc/emulators/vmware-module3: Makefile distinfo

 Log Message:
 Update package to 3.2.1.8, based on the patches in PR 29943 and some extra
 patches from Juergen for 3.99.14.


 To generate a diff of this commit:
 cvs rdiff -r1.19 -r1.20 pkgsrc/emulators/vmware-module3/Makefile
 cvs rdiff -r1.11 -r1.12 pkgsrc/emulators/vmware-module3/distinfo

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: veego@netbsd.org
State-Changed-When: Sun, 26 Mar 2006 21:44:03 +0000
State-Changed-Why:
Patches were applied so it should be save to close this pr, but I want
to have the feedback to do that.
So, can we close this pr?


State-Changed-From-To: feedback->closed
State-Changed-By: veego@netbsd.org
State-Changed-When: Mon, 27 Mar 2006 18:41:11 +0000
State-Changed-Why:
Juergen confirmed that this pr can be closed.
Thank you for this pr and the patches.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.