All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] arm, mips and mipsel broken
@ 2009-11-10 20:50 Aurelien Jarno
  2009-11-10 21:19 ` Blue Swirl
  2009-11-12 17:34 ` Stefan Weil
  0 siblings, 2 replies; 11+ messages in thread
From: Aurelien Jarno @ 2009-11-10 20:50 UTC (permalink / raw)
  To: qemu-devel

Please note that at least qemu-system-arm, qemu-system-mips and 
qemu-system-mipsel are broken by this commit:

commit c169998802505c244b8bcad562633f29de7d74a4
Author: Glauber Costa <glommer@redhat.com>
Date:   Thu Nov 5 16:05:15 2009 -0200

    v3: don't call reset functions on cpu initialization

    There is absolutely no need to call reset functions when initializing
    devices. Since we are already registering them, calling qemu_system_reset()
    should suffice. Actually, it is what happens when we reboot the machine,
    and using the same process instead of a special case semantics will even
    allow us to find bugs easier.

    Furthermore, the fact that we initialize things like the cpu quite early,
    leads to the need to introduce synchronization stuff like qemu_system_cond.
    This patch removes it entirely. All we need to do is call qemu_system_reset()
    only when we're already sure the system is up and running

    I tested it with qemu (with and without io-thread) and qemu-kvm, and it
    seems to be doing okay - although qemu-kvm uses a slightly different patch.

    [ v2: user mode still needs cpu_reset, so put it in ifdef. ]
    [ v3: leave qemu_system_cond for now. ]

    Signed-off-by: Glauber Costa <glommer@redhat.com>
    Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-10 20:50 [Qemu-devel] arm, mips and mipsel broken Aurelien Jarno
@ 2009-11-10 21:19 ` Blue Swirl
  2009-11-10 21:35   ` Aurelien Jarno
                     ` (2 more replies)
  2009-11-12 17:34 ` Stefan Weil
  1 sibling, 3 replies; 11+ messages in thread
From: Blue Swirl @ 2009-11-10 21:19 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Please note that at least qemu-system-arm, qemu-system-mips and
> qemu-system-mipsel are broken by this commit:

Given that none of the devices touched by the commit should be used by
these targets, the breakage comes from just the single new call to
qemu_system_reset in vl.c. This means that the reset functions for
those boards and devices must be awfully buggy.

I think the easiest solution is to surround the call by
#if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC)
#endif
until the devices have been fixed.

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-10 21:19 ` Blue Swirl
@ 2009-11-10 21:35   ` Aurelien Jarno
  2009-11-11 18:28     ` Paul Brook
       [not found]   ` <m3r5s6ndg2.fsf@neno.mitica>
  2009-11-11 18:57   ` [Qemu-devel] " Glauber Costa
  2 siblings, 1 reply; 11+ messages in thread
From: Aurelien Jarno @ 2009-11-10 21:35 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote:
> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > Please note that at least qemu-system-arm, qemu-system-mips and
> > qemu-system-mipsel are broken by this commit:
> 
> Given that none of the devices touched by the commit should be used by
> these targets, the breakage comes from just the single new call to
> qemu_system_reset in vl.c. This means that the reset functions for
> those boards and devices must be awfully buggy.
> 
> I think the easiest solution is to surround the call by
> #if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC)
> #endif
> until the devices have been fixed.
> 

I'll try to have a closer look at the problem tomorrow, if I can't find
the problem, it's what I'll commit.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

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

* [Qemu-devel] Re: arm, mips and mipsel broken
       [not found]   ` <m3r5s6ndg2.fsf@neno.mitica>
@ 2009-11-11 17:47     ` Blue Swirl
  2009-11-11 18:08       ` Blue Swirl
  0 siblings, 1 reply; 11+ messages in thread
From: Blue Swirl @ 2009-11-11 17:47 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel, Aurelien Jarno

On Wed, Nov 11, 2009 at 1:54 AM, Juan Quintela <quintela@trasno.org> wrote:
> Blue Swirl <blauwirbel@gmail.com> wrote:
>> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>> Please note that at least qemu-system-arm, qemu-system-mips and
>>> qemu-system-mipsel are broken by this commit:
>>
>> Given that none of the devices touched by the commit should be used by
>> these targets, the breakage comes from just the single new call to
>> qemu_system_reset in vl.c. This means that the reset functions for
>> those boards and devices must be awfully buggy.
>>
>> I think the easiest solution is to surround the call by
>> #if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC)
>> #endif
>> until the devices have been fixed.
>
> That call also breaks loadvm from the command line on x86_64.
> If I revert the rest of the patch except that line, I still get breakage
> on rtl8139.

Sigh. I'll leave only Sparc for now. Sorry for the trouble.

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

* [Qemu-devel] Re: arm, mips and mipsel broken
  2009-11-11 17:47     ` [Qemu-devel] " Blue Swirl
@ 2009-11-11 18:08       ` Blue Swirl
  0 siblings, 0 replies; 11+ messages in thread
From: Blue Swirl @ 2009-11-11 18:08 UTC (permalink / raw)
  To: Juan Quintela; +Cc: qemu-devel, Aurelien Jarno

On Wed, Nov 11, 2009 at 7:47 PM, Blue Swirl <blauwirbel@gmail.com> wrote:
> On Wed, Nov 11, 2009 at 1:54 AM, Juan Quintela <quintela@trasno.org> wrote:
>> Blue Swirl <blauwirbel@gmail.com> wrote:
>>> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>>> Please note that at least qemu-system-arm, qemu-system-mips and
>>>> qemu-system-mipsel are broken by this commit:
>>>
>>> Given that none of the devices touched by the commit should be used by
>>> these targets, the breakage comes from just the single new call to
>>> qemu_system_reset in vl.c. This means that the reset functions for
>>> those boards and devices must be awfully buggy.
>>>
>>> I think the easiest solution is to surround the call by
>>> #if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC)
>>> #endif
>>> until the devices have been fixed.
>>
>> That call also breaks loadvm from the command line on x86_64.
>> If I revert the rest of the patch except that line, I still get breakage
>> on rtl8139.
>
> Sigh. I'll leave only Sparc for now. Sorry for the trouble.
>

In fact it's easier to revert all commits and commit later one
architecture at a time.

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-10 21:35   ` Aurelien Jarno
@ 2009-11-11 18:28     ` Paul Brook
  2009-11-11 21:02       ` Blue Swirl
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Brook @ 2009-11-11 18:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Aurelien Jarno

On Tuesday 10 November 2009, Aurelien Jarno wrote:
> On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote:
> > On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net> 
wrote:
> > > Please note that at least qemu-system-arm, qemu-system-mips and
> > > qemu-system-mipsel are broken by this commit:
> >
> > Given that none of the devices touched by the commit should be used by
> > these targets, the breakage comes from just the single new call to
> > qemu_system_reset in vl.c. This means that the reset functions for
> > those boards and devices must be awfully buggy.
> 
> I'll try to have a closer look at the problem tomorrow, if I can't find
> the problem, it's what I'll commit.

This is latent breakage introduced by 45a50b1.
See commits 97fe84f5 (makes breakage obvious) and f2d7497 (fixed ARM).
MIPS still needs fixing.

Paul

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-10 21:19 ` Blue Swirl
  2009-11-10 21:35   ` Aurelien Jarno
       [not found]   ` <m3r5s6ndg2.fsf@neno.mitica>
@ 2009-11-11 18:57   ` Glauber Costa
  2009-11-11 21:00     ` Blue Swirl
  2 siblings, 1 reply; 11+ messages in thread
From: Glauber Costa @ 2009-11-11 18:57 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Aurelien Jarno

On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote:
> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > Please note that at least qemu-system-arm, qemu-system-mips and
> > qemu-system-mipsel are broken by this commit:
> 
> Given that none of the devices touched by the commit should be used by
> these targets, the breakage comes from just the single new call to
> qemu_system_reset in vl.c. This means that the reset functions for
> those boards and devices must be awfully buggy.
> 
> I think the easiest solution is to surround the call by
> #if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC)
> #endif
> until the devices have been fixed.

if we don't call that, how can we be sure that the devices are in fact reset?

We need a call to qemu_system_reset somewhere before we can start the machine
> 
> 

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-11 18:57   ` [Qemu-devel] " Glauber Costa
@ 2009-11-11 21:00     ` Blue Swirl
  0 siblings, 0 replies; 11+ messages in thread
From: Blue Swirl @ 2009-11-11 21:00 UTC (permalink / raw)
  To: Glauber Costa; +Cc: qemu-devel, Aurelien Jarno

On Wed, Nov 11, 2009 at 8:57 PM, Glauber Costa <glommer@redhat.com> wrote:
> On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote:
>> On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
>> > Please note that at least qemu-system-arm, qemu-system-mips and
>> > qemu-system-mipsel are broken by this commit:
>>
>> Given that none of the devices touched by the commit should be used by
>> these targets, the breakage comes from just the single new call to
>> qemu_system_reset in vl.c. This means that the reset functions for
>> those boards and devices must be awfully buggy.
>>
>> I think the easiest solution is to surround the call by
>> #if defined(TARGET_I386) || defined(TARGET_PPC) || defined(TARGET_SPARC)
>> #endif
>> until the devices have been fixed.
>
> if we don't call that, how can we be sure that the devices are in fact reset?
>
> We need a call to qemu_system_reset somewhere before we can start the machine

Strange, reverting the commits make PPC crash on boot, but
system_reset starts the system:
qemu: warning: could not load VGA bios 'video.x'
invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000000 0
invalid/unsupported opcode: 00 - 00 - 00 (00000000) 00000700 0
QEMU 0.11.50 monitor - type 'help' for more information
(qemu) system_reset
(qemu)
>> =============================================================
>> OpenBIOS 1.0 [Oct 18 2009 12:04]
>> Configuration device id QEMU version 1 machine id 2
>> CPUs: 1
>> Memory: 128M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,750
Welcome to OpenBIOS v1.0 built on Oct 18 2009 12:04

I'm not sure how to fix this.

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-11 18:28     ` Paul Brook
@ 2009-11-11 21:02       ` Blue Swirl
  2009-11-11 21:59         ` Paul Brook
  0 siblings, 1 reply; 11+ messages in thread
From: Blue Swirl @ 2009-11-11 21:02 UTC (permalink / raw)
  To: Paul Brook; +Cc: qemu-devel, Aurelien Jarno

On Wed, Nov 11, 2009 at 8:28 PM, Paul Brook <paul@codesourcery.com> wrote:
> On Tuesday 10 November 2009, Aurelien Jarno wrote:
>> On Tue, Nov 10, 2009 at 11:19:40PM +0200, Blue Swirl wrote:
>> > On Tue, Nov 10, 2009 at 10:50 PM, Aurelien Jarno <aurelien@aurel32.net>
> wrote:
>> > > Please note that at least qemu-system-arm, qemu-system-mips and
>> > > qemu-system-mipsel are broken by this commit:
>> >
>> > Given that none of the devices touched by the commit should be used by
>> > these targets, the breakage comes from just the single new call to
>> > qemu_system_reset in vl.c. This means that the reset functions for
>> > those boards and devices must be awfully buggy.
>>
>> I'll try to have a closer look at the problem tomorrow, if I can't find
>> the problem, it's what I'll commit.
>
> This is latent breakage introduced by 45a50b1.
> See commits 97fe84f5 (makes breakage obvious) and f2d7497 (fixed ARM).
> MIPS still needs fixing.

I can't find 97fe84f5 or f2d7497, what commits are those?

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-11 21:02       ` Blue Swirl
@ 2009-11-11 21:59         ` Paul Brook
  0 siblings, 0 replies; 11+ messages in thread
From: Paul Brook @ 2009-11-11 21:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Aurelien Jarno

> > This is latent breakage introduced by 45a50b1.
> > See commits 97fe84f5 (makes breakage obvious) and f2d7497 (fixed ARM).
> > MIPS still needs fixing.
> 
> I can't find 97fe84f5 or f2d7497, what commits are those?

http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=97fe84f5
http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=f2d7497

Paul

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

* Re: [Qemu-devel] arm, mips and mipsel broken
  2009-11-10 20:50 [Qemu-devel] arm, mips and mipsel broken Aurelien Jarno
  2009-11-10 21:19 ` Blue Swirl
@ 2009-11-12 17:34 ` Stefan Weil
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Weil @ 2009-11-12 17:34 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel

Aurelien Jarno schrieb:
> Please note that at least qemu-system-arm, qemu-system-mips and
> qemu-system-mipsel are broken by this commit:
>
> commit c169998802505c244b8bcad562633f29de7d74a4
> Author: Glauber Costa <glommer@redhat.com>
> Date: Thu Nov 5 16:05:15 2009 -0200
>
> v3: don't call reset functions on cpu initialization
> ...

Hi,

at least for MIPS Malta, cirrus vga is broken, too.

I see unassigned memory writes in low memory when linux
tries to blink the soft cursor, and there is no output on the
vga display.

The reset problem can be fixed partially with a simple code
change: removing load_kernel() in function main_cpu_reset
allows malta to boot again (only serial console, see above).
Reboot from linux does not work.

Regards,
Stefan

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

end of thread, other threads:[~2009-11-12 17:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 20:50 [Qemu-devel] arm, mips and mipsel broken Aurelien Jarno
2009-11-10 21:19 ` Blue Swirl
2009-11-10 21:35   ` Aurelien Jarno
2009-11-11 18:28     ` Paul Brook
2009-11-11 21:02       ` Blue Swirl
2009-11-11 21:59         ` Paul Brook
     [not found]   ` <m3r5s6ndg2.fsf@neno.mitica>
2009-11-11 17:47     ` [Qemu-devel] " Blue Swirl
2009-11-11 18:08       ` Blue Swirl
2009-11-11 18:57   ` [Qemu-devel] " Glauber Costa
2009-11-11 21:00     ` Blue Swirl
2009-11-12 17:34 ` Stefan Weil

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.