From owner-freebsd-emulation@FreeBSD.ORG Tue May 4 07:09:11 2004 Return-Path: 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 0640216A4CE for ; Tue, 4 May 2004 07:09:11 -0700 (PDT) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1E7743D2F for ; Tue, 4 May 2004 07:09:07 -0700 (PDT) (envelope-from gallatin@cs.duke.edu) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.12.10/8.12.10) with ESMTP id i44E95xZ028052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 May 2004 10:09:05 -0400 (EDT) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.12.9p2/8.12.9/Submit) id i44E90WX098905; Tue, 4 May 2004 10:09:00 -0400 (EDT) (envelope-from gallatin) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16535.41980.12220.181753@grasshopper.cs.duke.edu> Date: Tue, 4 May 2004 10:09:00 -0400 (EDT) To: Bruce Evans In-Reply-To: <20040504215848.F9795@gamplex.bde.org> References: <16531.64457.287692.950839@grasshopper.cs.duke.edu> <200405032122.i43LMiVX055086@ambrisko.com> <16534.52410.881023.431391@grasshopper.cs.duke.edu> <20040504215848.F9795@gamplex.bde.org> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid cc: freebsd-emulation@freebsd.org Subject: Re: vmware2 patch for -CURRENT X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 May 2004 14:09:11 -0000 Bruce Evans writes: > On Mon, 3 May 2004, Andrew Gallatin wrote: > > It panics in sse2_pagezero() on my p4, so I have to break into > > the debugger and reduce my cpu_class to 3. I"m really glad that the > > jsnap builds have ddb built in.. ;) > > Apparently vmware2 doesn't support some SSE2 instructions despite claiming > to. The code that calls ss2_pagezero() seems to test mostly the right > things. (cpu_feature & CPU_SSE2) is supposed to indicate that the CPU > supports SSE2, and it shouldn't be necessary to also test cpu_class. > > Try my memory access benchmarks in ~bde/cache on freefall for debugging > this in userland (./w -c sse2 -f 19 uses the same access method as > sse2_pagezero()). Weird. It works in userspace: % ./bde_w -c sse2 -f 19 zeroJ: 2637193597 B/s ( 37919 us) (122532576 tsc) (movnti) The generic kernel dies at sse2_pagezero+0xe with a Fatal trap 1: priviliged instruction fault while in kernel mode According to gdb's disassemble, its the movnti: (gdb) disassemble sse2_pagezero Dump of assembler code for function sse2_pagezero: 0xc0757e04 : push %ebx 0xc0757e05 : mov 0x8(%esp,1),%ecx 0xc0757e09 : mov %ecx,%eax 0xc0757e0b : add $0x1000,%eax 0xc0757e10 : xor %ebx,%ebx 0xc0757e12 : movnti %ebx,(%ecx) 0xc0757e15 : add $0x4,%ecx 0xc0757e18 : cmp %ecx,%eax 0xc0757e1a : jne 0xc0757e12 0xc0757e1c : sfence 0xc0757e1f : pop %ebx 0xc0757e20 : ret 0xc0757e21 : lea 0x0(%esi),%esi Drew