All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Commit b2a575a1c652 broke i486 support.
@ 2017-05-28  5:18 Rob Landley
  2017-05-29  9:22 ` Thomas Huth
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Landley @ 2017-05-28  5:18 UTC (permalink / raw)
  To: qemu-devel

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.tar.gz
before and after that commit to check for yourself.

Rob

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
  2017-05-28  5:18 [Qemu-devel] Commit b2a575a1c652 broke i486 support Rob Landley
@ 2017-05-29  9:22 ` Thomas Huth
  2017-05-29 10:14   ` Richard W.M. Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Huth @ 2017-05-29  9:22 UTC (permalink / raw)
  To: Rob Landley, qemu-devel; +Cc: Marc Marí, Richard W.M. Jones, Paolo Bonzini

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.tar.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 case
(which I've done now).

 Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
  2017-05-29  9:22 ` Thomas Huth
@ 2017-05-29 10:14   ` Richard W.M. Jones
  2017-05-29 11:20     ` Thomas Huth
  2017-05-30 19:05     ` Rob Landley
  0 siblings, 2 replies; 8+ messages in thread
From: Richard W.M. Jones @ 2017-05-29 10:14 UTC (permalink / raw)
  To: Thomas Huth; +Cc: Rob Landley, qemu-devel, Marc Marí, Paolo Bonzini

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.tar.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 case
> (which I've done now).

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/InstructionSetSummary.pdf]

The cmovne instruction is generated by the compiler (GCC in my case),

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.

--- 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 += -O2
 endif
+override CFLAGS += -march=i386
 
 # Drop -fstack-protector and the like
 QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) $(CFLAGS_NOPIE) -ffreestanding


Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
  2017-05-29 10:14   ` Richard W.M. Jones
@ 2017-05-29 11:20     ` Thomas Huth
  2017-05-30 19:05     ` Rob Landley
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2017-05-29 11:20 UTC (permalink / raw)
  To: Richard W.M. Jones; +Cc: Paolo Bonzini, Marc Marí, qemu-devel

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.tar.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 case
>> (which I've done now).
> 
> 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/InstructionSetSummary.pdf]
> 
> The cmovne instruction is generated by the compiler (GCC in my case),
> 
> 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.
> 
> --- 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 += -O2
>  endif
> +override CFLAGS += -march=i386

I guess you could also use "-march=i486" here instead, since QEMU does
not emulate a 386, as far as I can see.

 Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
  2017-05-29 10:14   ` Richard W.M. Jones
  2017-05-29 11:20     ` Thomas Huth
@ 2017-05-30 19:05     ` Rob Landley
  2017-05-31  8:58       ` Thomas Huth
                         ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Rob Landley @ 2017-05-30 19:05 UTC (permalink / raw)
  To: Richard W.M. Jones, Thomas Huth; +Cc: qemu-devel, Marc Marí, Paolo Bonzini

On 05/29/2017 05:14 AM, Richard W.M. Jones wrote:
> 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/InstructionSetSummary.pdf]
> 
> The cmovne instruction is generated by the compiler (GCC in my case),
> 
> 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.

Is there any way to make it just _not_ load the option rom for -cpu 486?
It ran fine before that thing went in...

Rob

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
  2017-05-30 19:05     ` Rob Landley
@ 2017-05-31  8:58       ` Thomas Huth
  2017-05-31  9:03       ` Richard W.M. Jones
  2017-05-31 12:34       ` Paolo Bonzini
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2017-05-31  8:58 UTC (permalink / raw)
  To: Rob Landley, Richard W.M. Jones; +Cc: Paolo Bonzini, Marc Marí, qemu-devel

On 30.05.2017 21:05, Rob Landley wrote:
> On 05/29/2017 05:14 AM, Richard W.M. Jones wrote:
>> 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/InstructionSetSummary.pdf]
>>
>> The cmovne instruction is generated by the compiler (GCC in my case),
>>
>> 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.
> 
> Is there any way to make it just _not_ load the option rom for -cpu 486?
> It ran fine before that thing went in...

Looking at that commit b2a575a1c652 that you've mentioned, it seems like
you could work-around the problem by disabling DMA for the fw_cfg
device. Try something like adding the parameter

 -global fw_cfg.dma_enabled=false

to your command line. If that does not help, try to use an older machine
type, like "-M pc-i440fx-2.5".

 Thomas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
  2017-05-30 19:05     ` Rob Landley
  2017-05-31  8:58       ` Thomas Huth
@ 2017-05-31  9:03       ` Richard W.M. Jones
  2017-05-31 12:34       ` Paolo Bonzini
  2 siblings, 0 replies; 8+ messages in thread
From: Richard W.M. Jones @ 2017-05-31  9:03 UTC (permalink / raw)
  To: Rob Landley; +Cc: Thomas Huth, qemu-devel, Marc Marí, Paolo Bonzini

On Tue, May 30, 2017 at 02:05:15PM -0500, Rob Landley wrote:
> On 05/29/2017 05:14 AM, Richard W.M. Jones wrote:
> > 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/InstructionSetSummary.pdf]
> > 
> > The cmovne instruction is generated by the compiler (GCC in my case),
> > 
> > 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.
> 
> Is there any way to make it just _not_ load the option rom for -cpu 486?
> It ran fine before that thing went in...

Well it ran, but it was very slow.  The DMA method can be literally
orders of magnitude faster.

Does adding the flag I suggested help?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.
  2017-05-30 19:05     ` Rob Landley
  2017-05-31  8:58       ` Thomas Huth
  2017-05-31  9:03       ` Richard W.M. Jones
@ 2017-05-31 12:34       ` Paolo Bonzini
  2 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2017-05-31 12:34 UTC (permalink / raw)
  To: Rob Landley, Richard W.M. Jones, Thomas Huth; +Cc: qemu-devel, Marc Marí



On 30/05/2017 21:05, Rob Landley wrote:
> On 05/29/2017 05:14 AM, Richard W.M. Jones wrote:
>> 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/InstructionSetSummary.pdf]
>>
>> The cmovne instruction is generated by the compiler (GCC in my case),
>>
>> 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.
> 
> Is there any way to make it just _not_ load the option rom for -cpu 486?
> It ran fine before that thing went in...

You were loading another option ROM.  Thomas's suggested -global
invocation will revert to that ROM until we fix it.

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-05-31 12:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-28  5:18 [Qemu-devel] Commit b2a575a1c652 broke i486 support Rob Landley
2017-05-29  9:22 ` Thomas Huth
2017-05-29 10:14   ` Richard W.M. Jones
2017-05-29 11:20     ` Thomas Huth
2017-05-30 19:05     ` Rob Landley
2017-05-31  8:58       ` Thomas Huth
2017-05-31  9:03       ` Richard W.M. Jones
2017-05-31 12:34       ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.