From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40560 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q44qB-0003G7-07 for qemu-devel@nongnu.org; Mon, 28 Mar 2011 01:18:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q44q9-0007Tw-PC for qemu-devel@nongnu.org; Mon, 28 Mar 2011 01:18:10 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:63159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q44q9-0007To-ED for qemu-devel@nongnu.org; Mon, 28 Mar 2011 01:18:09 -0400 Message-ID: <4D901A0C.3090705@mail.berlios.de> Date: Mon, 28 Mar 2011 07:18:04 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] cirrus_vga: Remove unneeded reset References: <1301176389-14253-1-git-send-email-weil@mail.berlios.de> <20110328021753.GB16639@valinux.co.jp> In-Reply-To: <20110328021753.GB16639@valinux.co.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Isaku Yamahata Cc: QEMU Developers , "Michael S. Tsirkin" Am 28.03.2011 04:17, schrieb Isaku Yamahata: > Hi. cirrus_init_common() is used by both isa and pci cirrus. > and isa cirrus isn't qdevfied yet. > So what you want is > - remove qemu_register_reset() and cirrus_reset() from cirrus_init_common() > > - add to PCIDeviceInfo cirrus_vga_info > .qdev.reset = cirrus_reset() > in order to use pci reset framework. > > - add qemu_register_reset() and cirrus_reset() to isa_cirrus_vga_init() > (Hopefully convert isa cirrus to qdev. and use .qdev.reset at best. > But it's up to you) > > thanks, > > On Sat, Mar 26, 2011 at 10:53:09PM +0100, Stefan Weil wrote: >> cirrus_reset is also called by the pci framework, >> so there is no need to call it in cirrus_init_common. >> >> Cc: Michael S. Tsirkin >> Signed-off-by: Stefan Weil >> --- >> hw/cirrus_vga.c | 1 - >> 1 files changed, 0 insertions(+), 1 deletions(-) >> >> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c >> index 2724f7b..bdf4c8b 100644 >> --- a/hw/cirrus_vga.c >> +++ b/hw/cirrus_vga.c >> @@ -3024,7 +3024,6 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci) >> s->vga.cursor_draw_line = cirrus_cursor_draw_line; >> >> qemu_register_reset(cirrus_reset, s); >> - cirrus_reset(s); >> } >> >> /*************************************** >> -- >> 1.7.2.5 > I tested the new code with isa pc, too. In gdb, I could see that it also calls cirrus_reset twice. But isa pc is broken since the switch to sea bios, so obviously isa is an unmaintained part of qemu. Even with bochs bios, it no longer works, so it is broken at least twice. Stefan