Anders Nordby
2003-Sep-08 02:21 UTC
ports/55928: vmware2 broken on -STABLE, presumably by PAE import
Hi, On Sun, Aug 24, 2003 at 07:14:29AM -0400, Brandon S. Allbery KF8NH wrote:> >Synopsis: vmware2 broken on -STABLE, presumably by PAE import >> (..)Your patch makes VmWare2 build, but it doesn't make it work: - VmWare fails to allocate memory (see http://anders.fix.no/test/vmware/1.png and http://anders.fix.no/test/vmware/2.png). - There seems to be something wrong with vmmon, some error messages are reported to my console log: Console log for noname.aftenposten.no /dev/vmmon: HostIF_LockPage vpn=0x048a65 mpn=000000 already tracked Sep 8 10:07:54 noname /kernel: /dev/vmmon: HostIF_LockPage vpn=0x048a65 mpn=000000 already tracked /dev/vmmon: HostIF_LockPage vpn=0x048a65 mpn=000000 already tracked /dev/vmmon: HostIF_LockPage vpn=0x048a65 mpn=000000 already tracked /dev/vmmon: HostIF_LockPage vpn=0x048a65 mpn=000000 already tracked /dev/vmmon: HostIF_LockPage vpn=0x048a65 mpn=000000 already tracked Sep 8 10:07:58 noname last message repeated 4 times Oh, and FreeBSD gets unstable with these patches of yours. I've seen several hard hangs. I cleaned up the patch to be relative to the current port (patch attached). I'm applying your patch (pmap.patch-stable) if OSVERSION is less than 500000, and higher or equal to 480101 (which was used at the time of the PAE MFC). For those on the Cc: list, I added you because you committed PAE/pmap things, are on the -stable list or maintain the vmware2 port. :) Any tips or improvements to the patch to make VmWare2 work in FreeBSD again is very welcome. If we want VmWare supported in -stable at all (4.9 being right around the corner and all), this must be dealt with ASAP. Feel free to use me for testing your suggestions. Cheers, -- Anders. -------------- next part -------------- diff -Nur vmware2.old/Makefile vmware2/Makefile --- vmware2.old/Makefile Sun Apr 13 11:55:43 2003 +++ vmware2/Makefile Mon Sep 8 09:22:11 2003 @@ -99,6 +99,8 @@ .endif .if ${OSVERSION} >= 500027 ${CAT} ${FILESDIR}/pmap.patch | (cd ${WRKSRC} && patch) > /dev/null 2>&1 +.elseif ${OSVERSION} < 500000 && ${OSVERSION} >= 480101 + ${CAT} ${FILESDIR}/pmap.patch-stable | (cd ${WRKSRC} && patch) > /dev/null 2>&1 .endif ${CP} ${FILESDIR}/Makefile ${WRKSRC} ${CP} ${FILESDIR}/Makefile.vmmon ${WRKSRC}/vmmon-only/Makefile diff -Nur vmware2.old/files/pmap.patch-stable vmware2/files/pmap.patch-stable --- vmware2.old/files/pmap.patch-stable Thu Jan 1 01:00:00 1970 +++ vmware2/files/pmap.patch-stable Mon Sep 8 09:17:55 2003 @@ -0,0 +1,16 @@ +--- vmmon-only/freebsd/hostif.c.orig Mon Sep 8 09:10:39 2003 ++++ vmmon-only/freebsd/hostif.c Mon Sep 8 09:11:28 2003 +@@ -181,11 +181,11 @@ + { + #define DEB(x) + caddr_t addr = (caddr_t)VPN_2_VA(ppn); +- pt_entry_t pteptr = (pt_entry_t)vtopte(addr); ++ pt_entry_t pteptr = (pt_entry_t)vtopte((unsigned long) addr); + PTE pte; + + DEB(printf("FindMPN: for page %d address %p(phys %p) pteptr %p", ppn, addr, (caddr_t)vtophys(addr), pteptr)); +- pte=*pteptr; ++ pte=*((caddr_t)pteptr); + DEB(printf("(0x%08x)\n", pte)); + if (pte & PTE_P) { + return PTE_2_PFN(pte);
Brandon S. Allbery KF8NH
2003-Sep-08 04:38 UTC
ports/55928: vmware2 broken on -STABLE, presumably by PAE import
On Mon, 2003-09-08 at 05:21, Anders Nordby wrote:> Your patch makes VmWare2 build, but it doesn't make it work:I mentioned that in the bug report (and also said "almost certainly wrong"...).> Oh, and FreeBSD gets unstable with these patches of yours. I've seen > several hard hangs.I wouldn't have noticed as my FreeBSD was unstable anyway; this was before any patches for the PAE code appeared, so my machine was crashing every few hours anyway. :/ In any case, I had already guessed from the type change away from pointers that just using the provided values would do the wrong thing. I was hoping that getting the module to compile would at least produce some useful diagnostics before the incorrect page manipulations trashed too much of kernel memory.... (I am no kernel hacker, and in particular know approximately nothing about FreeBSD's memory management or how the PAE import changed it.) -- brandon s. allbery [linux,solaris,freebsd,perl] allbery@kf8nh.com system administrator [WAY too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon univ. KF8NH URGENT! E-xpedient nuked APK subdomains; kf8nh.apk.net is DEAD. Sorry.
Maybe Matching Threads
- 3.01 & FreeBSD Port/Install Makefile Config
- PAE removal patch for testing
- vmware2 VMware Workstation PANIC: BUG F(571):1607 bugNr=2302
- [PATCH] disable writable pagetables on FreeBSD
- Success : clang/LLVM-built host kernel and clang-built VMware kernel modules for VMware Player 14.1.1 on host Ubuntu 17.10 x86_64