Received: from eggs.gnu.org ([2001:4830:134:3::10]:56511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkHK2-00026n-BC for qemu-devel@nongnu.org; Tue, 13 May 2014 14:21:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkHJu-00067z-Qm for qemu-devel@nongnu.org; Tue, 13 May 2014 14:21:02 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:50950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkHJu-00067u-IA for qemu-devel@nongnu.org; Tue, 13 May 2014 14:20:54 -0400 Received: by mail-pa0-f51.google.com with SMTP id kq14so588686pab.10 for ; Tue, 13 May 2014 11:20:53 -0700 (PDT) Date: Tue, 13 May 2014 14:20:50 -0400 From: Kevin O'Connor Message-ID: <20140513182050.GA22433@morn.localdomain> References: <536F6241.2060806@bwalle.de> <20140511123720.GA20468@morn.localdomain> <705f2182cbc05c35147afbe7c06c62a6@bwalle.de> <20140512052918.GA2100@morn.localdomain> <20140512200731.GA15678@morn.localdomain> <20140513055244.GA32132@euler.fritz.box> <8c29ddc5f82d7003c36d71eb98d8ddcf@bwalle.de> <20140513154115.GA12093@morn.localdomain> <53725FA9.6050607@wiesinger.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53725FA9.6050607@wiesinger.com> Subject: Re: [Qemu-devel] uvesafb doesn't work with seabios List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerhard Wiesinger Cc: Bernhard Walle , qemu-devel@nongnu.org, kraxel@redhat.com On Tue, May 13, 2014 at 08:08:41PM +0200, Gerhard Wiesinger wrote: > On 13.05.2014 17:41, Kevin O'Connor wrote: > > The x86emu code does not properly emulate "leal" (as near as I can tell > >it treats it as a "leaw" instead), which leads to all sorts of bizarre > >behavior when it tries to interpret the code. This type of issue has > >occurred for a bunch of instructions (on both x86emu and on an emulator > >Windows uses) and we've worked around it in SeaVGABIOS with a combination > >of gcc compiler flags and by post processing gcc's assembler to remove > >some troublesome instructions. Unfortunately, I don't know of any way to > >convince gcc to not emit the "leal" instruction and the instruction > >appears too complex to readily patch out of the assembler. > > Can't that wrong behaviour of "leal" instruction be fixed in qemu? QEMU doesn't have any issue with leal. x86emu is a separate program that implements a (partial) x86 interpretter. The issue being reported is when QEMU runs a guest which uses x86emu to interpret SeaVGABIOS - QEMU is correctly emulating what a real machine would do (random faults) and thus it can't be fixed in QEMU itself. -Kevin