From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OAPTQ-0008O4-OW for qemu-devel@nongnu.org; Fri, 07 May 2010 11:28:21 -0400 Received: from [140.186.70.92] (port=37699 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OAPTM-0008Kh-4T for qemu-devel@nongnu.org; Fri, 07 May 2010 11:28:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OAPTI-0001B1-IZ for qemu-devel@nongnu.org; Fri, 07 May 2010 11:28:15 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:43262) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OAPTI-0001Aj-Cm for qemu-devel@nongnu.org; Fri, 07 May 2010 11:28:12 -0400 Received: by pvg13 with SMTP id 13so21869pvg.4 for ; Fri, 07 May 2010 08:28:11 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <4BD0A994.2090608@twiddle.net> <20100422234934.D3ACB101C@are.twiddle.net> <4BD72D5D.8000306@twiddle.net> Date: Fri, 7 May 2010 18:28:10 +0300 Message-ID: Subject: Re: [Qemu-devel] Re: [PATCH] Remove IO_MEM_SUBWIDTH. From: Blue Swirl Content-Type: text/plain; charset=UTF-8 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Artyom Tarasenko Cc: qemu-devel@nongnu.org, Richard Henderson On 5/6/10, Artyom Tarasenko wrote: > 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_index, > >> CPUWriteMemoryFunc * const *mem_write, > >> void *opaque) > >> { > >> + int i; > >> + > >> if (io_index <= 0) { > >> io_index = get_free_io_mem_idx(); > >> if (io_index == -1) > >> @@ -3296,8 +3298,14 @@ static int cpu_register_io_memory_fixed(int io_index, > >> return -1; > >> } > >> > >> - memcpy(io_mem_read[io_index], mem_read, 3 * sizeof(CPUReadMemoryFunc*)); > >> - memcpy(io_mem_write[io_index], mem_write, 3 * sizeof(CPUWriteMemoryFunc*)); > >> + for (i = 0; i < 3; ++i) { > >> + io_mem_read[io_index][i] > >> + = (mem_read[i] ? mem_read[i] : unassigned_mem_read[i]); > >> + } > >> + for (i = 0; i < 3; ++i) { > >> + io_mem_write[io_index][i] > >> + = (mem_write[i] ? mem_write[i] : unassigned_mem_write[i]); > >> + } > >> io_mem_opaque[io_index] = opaque; > >> > >> return (io_index << IO_MEM_SHIFT); > >> > > > Why the fix didn't make it into the git? > Does it introduce other problems? A diff is not a patch, there is no commit description or SoB. > > Looks good, thanks. > > > > Acked-by: Artyom Tarasenko > > > > -- > Regards, > Artyom Tarasenko > > solaris/sparc under qemu blog: http://tyom.blogspot.com/ >