[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] translate-all.c: fix debug memory maps printing
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] translate-all.c: fix debug memory maps printing |
Date: |
Mon, 25 Aug 2014 14:05:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
Il 25/08/2014 13:45, Paolo Bonzini ha scritto:
> Il 11/08/2014 12:28, Mikhail Ilyin ha scritto:
>> Fix memory maps textualizing function. The output was not correct because of
>> wrong base address calculation. The initial address has to be shifted also
>> for TARGET_PAGE_BITS.
>>
>> Signed-off-by: Mikhail Ilyin <address@hidden>
>> ---
>> translate-all.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/translate-all.c b/translate-all.c
>> index 8f7e11b..cb7a33d 100644
>> --- a/translate-all.c
>> +++ b/translate-all.c
>> @@ -1728,9 +1728,8 @@ int walk_memory_regions(void *priv,
>> walk_memory_regions_fn fn)
>> data.prot = 0;
>>
>> for (i = 0; i < V_L1_SIZE; i++) {
>> - int rc = walk_memory_regions_1(&data, (abi_ulong)i << V_L1_SHIFT,
>> + int rc = walk_memory_regions_1(&data, (abi_ulong)i << (V_L1_SHIFT +
>> TARGET_PAGE_BITS),
>> V_L1_SHIFT / V_L2_BITS - 1, l1_map +
>> i);
>> -
>> if (rc != 0) {
>> return rc;
>> }
>>
>
> Thanks, this is simple enough that I've queued it.
Ouch, I spoke too soon.
This patch fails to compile for MIPS N32 (a 32-bit ABI with a 64-bit
virtual address space). I'm not sure if there is a simple fix.
walk_memory_regions and its user should be changed to use target_ulong
instead of abi_ulong. access_ok probably needs to be changed in the
same way too. Riku, do you have any ideas (or free cycles to do the
change)?
Paolo