qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/6] qdev: reset qdev along with qdev tree


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v2 2/6] qdev: reset qdev along with qdev tree
Date: Thu, 16 Dec 2010 18:24:43 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Lightning/1.0b1 Thunderbird/3.0.10

On 12/16/2010 05:48 PM, Michael S. Tsirkin wrote:
On Thu, Dec 16, 2010 at 08:31:21PM +0100, Stefan Weil wrote:
Am 19.11.2010 10:55, schrieb Isaku Yamahata:
From: Anthony Liguori<address@hidden>

This patch changes the reset handling so that qdev has no knowledge of the
global system reset. Instead, a new bus/device level function is
introduced
that allows all devices/buses on the bus/device to be reset using a depth
first transversal.

N.B. we have to expose the implicit system bus because we have
various hacks
that result in an implicit system bus existing. Instead, we ought
to have an
explicitly created system bus that we can trigger reset from.
That's a topic
for a future patch though.

Signed-off-by: Anthony Liguori<address@hidden>
Signed-off-by: Isaku Yamahata<address@hidden>
---
hw/qdev.c | 28 +++++++++++++++++++---------
hw/qdev.h | 4 ++++
vl.c | 1 +
3 files changed, 24 insertions(+), 9 deletions(-)

This patch (which is included in qemu master now) introduces
two regressions at least for MIPS system emulation:

The emulated MIPS machines mipssim and malta no longer work
because qemu tries a null pointer read access (caused by
sysbus_get_default returning NULL). Just run any of these
machines (big or little endian, 32 or 64 bit) with any mips
kernel or bios to get this crash.

This first regression can be fixed with a patch which I have
sent to qemu-devel.

The second regression also occurs with MIPS malta.
Networking no longer works with the default pcnet nic.

This is caused because the reset function for pcnet is no
longer called during system boot. The result in an invalid
mac address (all zero) and a non-working nic.

For this second regression I still have no simple solution.
Of course mips_malta.c should be converted to qdev which
would fix both problems (but only for malta system emulation).

Maybe other systems / devices don't get their reset functions
called during system boot, too.

Stefan Weil
Ugh, I keep forgetting about the non-qdev systems.
Maybe it's a good way to finally make everyone to convert? If a system
maintainer can't be bothered to convert to qdev we can declare the
system unsupported :)

Honestly, I think that's a fair thing to do.

Regards,

Anthony Liguori



reply via email to

[Prev in Thread] Current Thread [Next in Thread]