From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OA7lZ-0000AK-Dx for qemu-devel@nongnu.org; Thu, 06 May 2010 16:33:53 -0400 Received: from [140.186.70.92] (port=51164 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OA7lX-0008Tj-H9 for qemu-devel@nongnu.org; Thu, 06 May 2010 16:33:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OA7l0-0004Zi-EP for qemu-devel@nongnu.org; Thu, 06 May 2010 16:33:25 -0400 Received: from mail-ww0-f45.google.com ([74.125.82.45]:50456) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OA7l0-0004ZU-9r for qemu-devel@nongnu.org; Thu, 06 May 2010 16:33:18 -0400 Received: by wwd20 with SMTP id 20so310045wwd.4 for ; Thu, 06 May 2010 13:33:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <4BD0A994.2090608@twiddle.net> <20100422234934.D3ACB101C@are.twiddle.net> <4BD72D5D.8000306@twiddle.net> From: Artyom Tarasenko Date: Thu, 6 May 2010 22:25:03 +0200 Message-ID: Subject: Re: [Qemu-devel] Re: [PATCH] Remove IO_MEM_SUBWIDTH. Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Blue Swirl , qemu-devel@nongnu.org 2010/4/28 Artyom Tarasenko : > 2010/4/27 Richard Henderson : >> On 04/26/2010 02:54 PM, Artyom Tarasenko wrote: >>> This patch introduces a regression. qemu crashes on lance test: >> >> I'm not sure how to get to this, since the sparc-test images don't >> include ifconfig, and I havn't been able to find a sparc install >> image that works (doesn't support sparc32 or sparc64 fails to load). >> >> That said, try this and see if it works. >> >> >> r~ >> >> --- >> diff --git a/exec.c b/exec.c >> index 14d1fd7..572d3fd 100644 >> --- a/exec.c >> +++ b/exec.c >> @@ -3286,6 +3286,8 @@ static int cpu_register_io_memory_fixed(int io_ind= ex, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 CPUWriteMemoryFunc * const *mem_write, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 void *opaque) >> =A0{ >> + =A0 =A0int i; >> + >> =A0 =A0 if (io_index <=3D 0) { >> =A0 =A0 =A0 =A0 io_index =3D get_free_io_mem_idx(); >> =A0 =A0 =A0 =A0 if (io_index =3D=3D -1) >> @@ -3296,8 +3298,14 @@ static int cpu_register_io_memory_fixed(int io_in= dex, >> =A0 =A0 =A0 =A0 =A0 =A0 return -1; >> =A0 =A0 } >> >> - =A0 =A0memcpy(io_mem_read[io_index], mem_read, 3 * sizeof(CPUReadMemor= yFunc*)); >> - =A0 =A0memcpy(io_mem_write[io_index], mem_write, 3 * sizeof(CPUWriteMe= moryFunc*)); >> + =A0 =A0for (i =3D 0; i < 3; ++i) { >> + =A0 =A0 =A0 =A0io_mem_read[io_index][i] >> + =A0 =A0 =A0 =A0 =A0 =A0=3D (mem_read[i] ? mem_read[i] : unassigned_mem= _read[i]); >> + =A0 =A0} >> + =A0 =A0for (i =3D 0; i < 3; ++i) { >> + =A0 =A0 =A0 =A0io_mem_write[io_index][i] >> + =A0 =A0 =A0 =A0 =A0 =A0=3D (mem_write[i] ? mem_write[i] : unassigned_m= em_write[i]); >> + =A0 =A0} >> =A0 =A0 io_mem_opaque[io_index] =3D opaque; >> >> =A0 =A0 return (io_index << IO_MEM_SHIFT); >> Why the fix didn't make it into the git? Does it introduce other problems? > Looks good, thanks. > > Acked-by: Artyom Tarasenko > --=20 Regards, Artyom Tarasenko solaris/sparc under qemu blog: http://tyom.blogspot.com/