From owner-freebsd-emulation Mon Sep 2 15:46:37 2002 Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C40C37B401 for ; Mon, 2 Sep 2002 15:46:26 -0700 (PDT) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2ABB43E7B for ; Mon, 2 Sep 2002 15:46:24 -0700 (PDT) (envelope-from marks@ripe.net) Received: from laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.5/8.11.6) with SMTP id g82MkMEs015613; Tue, 3 Sep 2002 00:46:22 +0200 Received: (nullmailer pid 6601 invoked by uid 1000); Mon, 02 Sep 2002 22:45:46 -0000 Date: Tue, 3 Sep 2002 00:45:46 +0200 From: Mark Santcroos To: Ian Dowse Cc: emulation@FreeBSD.ORG Subject: Re: vmware2 fix for fo_ioctl api change Message-ID: <20020902224546.GA715@laptop.6bone.nl> References: <20020820110134.GG716@laptop.6bone.nl> <200209021943.aa05393@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200209021943.aa05393@salmon.maths.tcd.ie> User-Agent: Mutt/1.4i X-Handles: MS6-6BONE, MS18417-RIPE X-RIPE-Spam-Status: NONE ; -1034 X-RIPE-Spam-Level: Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi Ian, I'm getting this, so thats probably not the thing your patch is fixing. (I tried it also actually) -------- linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented dscheck(md0): bio_bcount 1648 is not on a sector boundary (ssize 512) linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented linux: 'ioctl' fd=12, cmd=0x5401 ('T',1) not implemented dscheck(md0): bio_bcount 1648 is not on a sector boundary (ssize 512) linux: 'ioctl' fd=12, cmd=0x5401 ('T',1) not implemented linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented dscheck(md0): bio_bcount 1648 is not on a sector boundary (ssize 512) linux: 'ioctl' fd=10, cmd=0x5401 ('T',1) not implemented ---------- I haven't had the time yet to do a binary search to find the commit that broke it. Hopefully soon.. Thanks Mark On Mon, Sep 02, 2002 at 07:43:52PM +0100, Ian Dowse wrote: > In message <20020820110134.GG716@laptop.6bone.nl>, Mark Santcroos writes: > >Attached patches fixes compilation of vmware2 on -CURRENT. > >Note that it doesn't work at the moment, but that has other reasons and > >will be addressed in a seperate patch. > >(Not sure yet whether it is a vmware thing or a linux emu thing) > > The following patch seems to make it actually run on -current for > me, though I haven't tested it very extensively. > > Ian > > Index: files/patch-be > =================================================================== > RCS file: /home/iedowse/CVS/ports/emulators/vmware2/files/patch-be,v > retrieving revision 1.2 > diff -u -r1.2 patch-be > --- files/patch-be 12 Jul 2001 14:26:10 -0000 1.2 > +++ files/patch-be 2 Sep 2002 18:32:43 -0000 > @@ -1,5 +1,5 @@ > ---- vmmon-only/freebsd/hostif.c.orig Thu Jul 12 22:05:29 2001 > -+++ vmmon-only/freebsd/hostif.c Thu Jul 12 22:14:09 2001 > +--- vmmon-only/freebsd/hostif.c.orig Mon Sep 2 19:19:50 2002 > ++++ vmmon-only/freebsd/hostif.c Mon Sep 2 19:30:03 2002 > @@ -55,7 +55,11 @@ > > #include > @@ -12,75 +12,113 @@ > #include > #include > #include > -@@ -107,7 +111,16 @@ > +@@ -107,7 +111,21 @@ > > paddr = (vm_offset_t)addr; > m = PHYS_TO_VM_PAGE(paddr); > -+#if __FreeBSD_version >= 500021 > +- vm_page_wire(m); > ++#if __FreeBSD_version >= 500038 > + GIANT_REQUIRED; > ++ vm_page_lock_queues(); > ++ vm_page_wire(m); > ++ vm_page_unlock_queues(); > ++#elif __FreeBSD_version >= 500021 > ++ GIANT_REQUIRED; > ++ vm_page_wire(m); > +#elif __FreeBSD_version >= 500013 > + mtx_lock(&vm_mtx); > -+#endif > - vm_page_wire(m); > -+#if __FreeBSD_version >= 500021 > -+#elif __FreeBSD_version >= 500013 > ++ vm_page_wire(m); > + mtx_unlock(&vm_mtx); > ++#else > ++ vm_page_wire(m); > +#endif > return 0; > } > > -@@ -120,7 +133,16 @@ > +@@ -120,7 +138,21 @@ > > paddr = (vm_offset_t)addr; > m = PHYS_TO_VM_PAGE(paddr); > -+#if __FreeBSD_version >= 500021 > ++#if __FreeBSD_version >= 500038 > ++ GIANT_REQUIRED; > ++ vm_page_lock_queues(); > ++ vm_page_unwire(m, 1); > ++ vm_page_unlock_queues(); > ++#elif __FreeBSD_version >= 500021 > + GIANT_REQUIRED; > ++ vm_page_unwire(m, 1); > +#elif __FreeBSD_version >= 500013 > + mtx_lock(&vm_mtx); > -+#endif > vm_page_unwire(m, 1); > -+#if __FreeBSD_version >= 500021 > -+#elif __FreeBSD_version >= 500013 > + mtx_unlock(&vm_mtx); > ++#else > ++ vm_page_unwire(m, 1); > +#endif > return 0; > } > > -@@ -1066,10 +1088,19 @@ > +@@ -1066,10 +1098,33 @@ > return NULL; > } > paddr = vtophys(addr); > -+#if __FreeBSD_version >= 500021 > -+ GIANT_REQUIRED; > ++#if __FreeBSD_version >= 500038 > ++ GIANT_REQUIRED; > ++ ka->kaddr = kmem_alloc_pageable(kernel_map, PAGE_SIZE); > ++ ka->map = PHYS_TO_VM_PAGE(paddr); > ++ vm_page_lock_queues(); > ++ vm_page_wire(ka->map); > ++ vm_page_unlock_queues(); > ++ pmap_qenter(ka->kaddr, &ka->map, 1); > ++#elif __FreeBSD_version >= 500021 > ++ GIANT_REQUIRED; > ++ 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); > +#elif __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); > ++ mtx_unlock(&vm_mtx); > ++#else > 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 >= 500021 > -+#elif __FreeBSD_version >= 500013 > -+ mtx_unlock(&vm_mtx); > +#endif > return ka->kaddr; > } > > -@@ -1079,9 +1110,18 @@ > +@@ -1079,9 +1134,29 @@ > if (ka->map==NULL) > return 0; > > -+#if __FreeBSD_version >= 500021 > +- vm_page_unwire(ka->map, 1); > +- pmap_kremove(ka->kaddr); > ++#if __FreeBSD_version >= 500038 > + GIANT_REQUIRED; > -+#elif __FreeBSD_version >= 500013 > -+ mtx_lock(&vm_mtx); > -+#endif > - vm_page_unwire(ka->map, 1); > - pmap_kremove(ka->kaddr); > ++ vm_page_lock_queues(); > ++ vm_page_unwire(ka->map, 1); > ++ vm_page_unlock_queues(); > ++ pmap_qremove(ka->kaddr, 1); > kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > -+#if __FreeBSD_version >= 500021 > ++#elif __FreeBSD_version >= 500021 > ++ GIANT_REQUIRED; > ++ vm_page_unwire(ka->map, 1); > ++ pmap_kremove(ka->kaddr); > ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > +#elif __FreeBSD_version >= 500013 > ++ mtx_lock(&vm_mtx); > ++ vm_page_unwire(ka->map, 1); > ++ pmap_kremove(ka->kaddr); > ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > + mtx_unlock(&vm_mtx); > ++#else > ++ vm_page_unwire(ka->map, 1); > ++ pmap_kremove(ka->kaddr); > ++ kmem_free(kernel_map, ka->kaddr, PAGE_SIZE); > +#endif > ka->kaddr = 0; > ka->map = NULL; > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-emulation" in the body of the message -- Mark Santcroos RIPE Network Coordination Centre http://www.ripe.net/home/mark/ New Projects Group/TTM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message