From owner-freebsd-emulation Thu Feb 1 10:59:28 2001 Delivered-To: freebsd-emulation@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id 7383337B65D for ; Thu, 1 Feb 2001 10:59:06 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id NAA20277; Thu, 1 Feb 2001 13:59:06 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.1/8.9.1) id f11Ix5W40021; Thu, 1 Feb 2001 13:59:05 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 1 Feb 2001 13:59:05 -0500 (EST) To: "Sam Leffler" Cc: Subject: Re: experiences running vmware w/freebsd 5.0-current as guest In-Reply-To: <06d701c08c72$49a9d080$24a6d4d1@melange> References: <14968.51758.59870.15884@grasshopper.cs.duke.edu> <06d701c08c72$49a9d080$24a6d4d1@melange> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <14969.39659.18817.437539@grasshopper.cs.duke.edu> Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Sam Leffler writes: <...> > > a) VMware crashes when the pcn driver probes the AMD PCInet card. > > This is indicated by a "NOT_IMPLEMENTED F(562):1654" message > > shortly after FreeBSD probes the PCI bus, right after > > message pci0: at 15.0 (no driver attached). > > > > This assertion is caused by the pcn driver doing 32-bit ins and outs to > 16-bit registers (the upper 16 bits are reserved). OK. Cool. So this should be fixable. I don't know anything about the PCInet's registers, though. Perhaps we should get the driver's author involved. <...> > > It could be that the use of the cmpxchgl instruction is finding a slow path > through the runtime; if you have the code fragment handy I can forward it to > the appropriate VMware folks. > The I386_CPU path is the "fast path" under vmware, the #else clause is the slow path under vmware: #if defined(I386_CPU) static __inline int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) { int res = exp; __asm __volatile( " pushfl ; " " cli ; " " cmpl %1,%3 ; " " jne 1f ; " " movl %2,%3 ; " "1: " " sete %%al; " " movzbl %%al,%0 ; " " popfl ; " "# atomic_cmpset_int" : "=a" (res) /* 0 (result) */ : "0" (exp), /* 1 */ "r" (src), /* 2 */ "m" (*(dst)) /* 3 */ : "memory"); return (res); } #else /* defined(I386_CPU) */ static __inline int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) { int res = exp; __asm __volatile ( " " MPLOCKED " " " cmpxchgl %2,%3 ; " " setz %%al ; " " movzbl %%al,%0 ; " "1: " "# atomic_cmpset_int" : "=a" (res) /* 0 (result) */ : "0" (exp), /* 1 */ "r" (src), /* 2 */ "m" (*(dst)) /* 3 */ : "memory"); return (res); } #endif /* defined(I386_CPU) */ Thanks! Drew ------------------------------------------------------------------------------ Andrew Gallatin, Sr Systems Programmer http://www.cs.duke.edu/~gallatin Duke University Email: gallatin@cs.duke.edu Department of Computer Science Phone: (919) 660-6590 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message