From owner-freebsd-emulation@FreeBSD.ORG Tue Apr 1 08:50:03 2008 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0C411065672 for ; Tue, 1 Apr 2008 08:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A33088FC2C for ; Tue, 1 Apr 2008 08:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m318o3GJ011960 for ; Tue, 1 Apr 2008 08:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m318o3G1011959; Tue, 1 Apr 2008 08:50:03 GMT (envelope-from gnats) Date: Tue, 1 Apr 2008 08:50:03 GMT Message-Id: <200804010850.m318o3G1011959@freefall.freebsd.org> To: freebsd-emulation@FreeBSD.org From: "Yi Wang" Cc: Subject: Re: ports/117350: compile error in emulators/vmware3 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Yi Wang List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2008 08:50:03 -0000 The following reply was made to PR ports/117350; it has been noted by GNATS. From: "Yi Wang" To: "Boris Samorodov" Cc: bug-followup@freebsd.org, fchang@cs.ubc.ca Subject: Re: ports/117350: compile error in emulators/vmware3 Date: Tue, 1 Apr 2008 16:23:12 +0800 On 3/4/08, Boris Samorodov wrote: > Here is a relevant diff for the port to test: > ----- > Index: Makefile > =================================================================== > RCS file: /home/pcvs/ports/emulators/vmware3/Makefile,v > retrieving revision 1.96 > diff -u -r1.96 Makefile > --- Makefile 25 Oct 2007 00:13:00 -0000 1.96 > +++ Makefile 4 Mar 2008 07:15:18 -0000 > @@ -105,6 +105,10 @@ > cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/fbsd6-1.patch > cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/fbsd6-2.patch > .endif > +.if ${OSVERSION} > 700000 > + cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/fbsd7-1.patch > + cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/fbsd7-2.patch > +.endif > > pre-install: > ${INSTALL_MAN} ${WRKSRC}/man/man1/vmware.1 ${MANPREFIX}/man/man1 > Index: files/fbsd7-1.patch > =================================================================== > RCS file: files/fbsd7-1.patch > diff -N files/fbsd7-1.patch > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/fbsd7-1.patch 4 Mar 2008 07:15:18 -0000 > @@ -0,0 +1,45 @@ > +--- vmmon-only/freebsd/driver.c.orig 2008-03-04 10:05:14.000000000 +0300 > ++++ vmmon-only/freebsd/driver.c 2008-03-04 10:09:23.000000000 +0300 > +@@ -397,12 +397,12 @@ > > + if ((error = falloc(td, &fp, &fd)) != 0) > + return error; > + > +- FILEDESC_LOCK(p->p_fd); > ++ FILEDESC_XLOCK(p->p_fd); > + fp->f_data = data; > + fp->f_flag = flags & FMASK; > + fp->f_ops = &vmmon_fileops; > + fp->f_type = DTYPE_SOCKET; > +- FILEDESC_UNLOCK(p->p_fd); > ++ FILEDESC_XUNLOCK(p->p_fd); > + > + #if __FreeBSD_version >= 501111 > + /* falloc now returns TWO references to the file, not one. */ > +@@ -1309,6 +1309,19 @@ > + return FALSE; > + } > + > ++static vm_paddr_t > ++get_avail_end(void) > ++{ > ++ vm_paddr_t avail_end; > ++ int i; > ++ avail_end = phys_avail[1]; > ++ for (i = 0; phys_avail[i + 1]; i += 2) { > ++ if (phys_avail[i + 1] > avail_end) > ++ avail_end = phys_avail[i + 1]; > ++ } > ++ return avail_end; > ++} > ++ > + /* > + * Allocate and lock numPages of memory physically continguous addresses > + * below 4GB. > +@@ -1341,6 +1354,7 @@ > + VMDEBUG("vmmon_alloc_low_pages: malloc MemRange failed\n"); > + return ENOMEM; > + } > ++ vm_paddr_t avail_end = get_avail_end(); > + if (avail_end > ISA_DMA_BOUNCE_THRESHOLD) > + high = trunc_page(ISA_DMA_BOUNCE_THRESHOLD); > + else > > Index: files/fbsd7-2.patch > =================================================================== > RCS file: files/fbsd7-2.patch > diff -N files/fbsd7-2.patch > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ files/fbsd7-2.patch 4 Mar 2008 07:15:18 -0000 > @@ -0,0 +1,18 @@ > +--- vmmon-only/include/vm_asm.h.orig 2003-07-24 01:43:38.000000000 +0400 > ++++ vmmon-only/include/vm_asm.h 2008-03-04 09:29:45.000000000 +0300 > +@@ -1020,6 +1020,7 @@ > > + *----------------------------------------------------------------------------- > + */ > + > ++#if 0 > + static INLINE void > + Div643264(uint64 dividend, > + uint32 divisor, > +@@ -1047,6 +1048,7 @@ > + *quotient = (uint64)hQuotient << 32 | lQuotient; > + } > + #endif > ++#endif > + > + > + #endif /* VM_ASM_H */ > > > ----- > > WBR > > -- > bsam > The patch works fine. Thanks a lot! BTW, when will this patch be commited to the ports tree? -- Regards, Wang Yi