From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFIjC-0002xW-WC for qemu-devel@nongnu.org; Mon, 29 May 2017 07:20:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFIj9-0003uI-Ru for qemu-devel@nongnu.org; Mon, 29 May 2017 07:20:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43004) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dFIj9-0003uC-Lt for qemu-devel@nongnu.org; Mon, 29 May 2017 07:20:47 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7477F80F75 for ; Mon, 29 May 2017 11:20:46 +0000 (UTC) References: <1c8f4f4e-65f7-2d12-a391-08781fea651c@landley.net> <20170529101413.GN16511@redhat.com> From: Thomas Huth Message-ID: <0bcac9a0-f633-1ed1-6917-ab43776daddc@redhat.com> Date: Mon, 29 May 2017 13:20:41 +0200 MIME-Version: 1.0 In-Reply-To: <20170529101413.GN16511@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: Paolo Bonzini , =?UTF-8?Q?Marc_Mar=c3=ad?= , qemu-devel@nongnu.org On 29.05.2017 12:14, Richard W.M. Jones wrote: > On Mon, May 29, 2017 at 11:22:14AM +0200, Thomas Huth wrote: >> On 28.05.2017 07:18, Rob Landley wrote: >>> You can't boot a kernel under -cpu 486 since that commit (hangs >>> producing no output) because it added a bios image that won't run on >>> anything short of pentium II. >>> >>> You can try the run-emulator.sh script in >>> http://landley.net/aboriginal/downloads/binaries/system-image-i486.ta= r.gz >>> before and after that commit to check for yourself. >> >> Hi Rob, >> >> thanks for the bug report ... but to make sure that your mail does not >> get lost in the high traffic of the qemu-devel mailing list, it might = be >> a good idea to CC: the people from that commit b2a575a1c652 in this ca= se >> (which I've done now). >=20 > I see in the disassembly use of cmovne (new in Pentium Pro) and > bswap (new in 486). > [http://cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/Instruct= ionSetSummary.pdf] >=20 > The cmovne instruction is generated by the compiler (GCC in my case), >=20 > The following patch removes the cmovne instruction, so it should work > on 486 (although I didn't test it). It's not possible to remove bswap > without surgery on the inline assembler. >=20 > --- a/pc-bios/optionrom/Makefile > +++ b/pc-bios/optionrom/Makefile > @@ -13,6 +13,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/optionrom) > ifeq ($(lastword $(filter -O%, -O0 $(CFLAGS))),-O0) > override CFLAGS +=3D -O2 > endif > +override CFLAGS +=3D -march=3Di386 I guess you could also use "-march=3Di486" here instead, since QEMU does not emulate a 386, as far as I can see. Thomas