qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: [PATCH] Remove IO_MEM_SUBWIDTH.


From: Artyom Tarasenko
Subject: Re: [Qemu-devel] Re: [PATCH] Remove IO_MEM_SUBWIDTH.
Date: Thu, 6 May 2010 22:25:03 +0200

2010/4/28 Artyom Tarasenko <address@hidden>:
> 2010/4/27 Richard Henderson <address@hidden>:
>> 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?

> Looks good, thanks.
>
> Acked-by: Artyom Tarasenko <address@hidden>
>

-- 
Regards,
Artyom Tarasenko

solaris/sparc under qemu blog: http://tyom.blogspot.com/




reply via email to

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