All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memory: Fix wrong end address dump
@ 2022-06-22  9:59 Zhenzhong Duan
  2022-06-22 21:05 ` Peter Xu
  2022-07-22  6:43 ` David Hildenbrand
  0 siblings, 2 replies; 6+ messages in thread
From: Zhenzhong Duan @ 2022-06-22  9:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, peterx, david, f4bug

The end address of memory region section isn't correctly calculated
which leads to overflowed mtree dump:

  Dispatch
    Physical sections
      ......
      #70 @0000000000002000..0000000000011fff io [ROOT]
      #71 @0000000000005000..0000000000005fff (noname)
      #72 @0000000000005000..0000000000014fff io [ROOT]
      #73 @0000000000005658..0000000000005658 vmport
      #74 @0000000000005659..0000000000015658 io [ROOT]
      #75 @0000000000006000..0000000000015fff io [ROOT]

After fix:
      #70 @0000000000002000..0000000000004fff io [ROOT]
      #71 @0000000000005000..0000000000005fff (noname)
      #72 @0000000000005000..0000000000005657 io [ROOT]
      #73 @0000000000005658..0000000000005658 vmport
      #74 @0000000000005659..0000000000005fff io [ROOT]
      #75 @0000000000006000..000000000000ffff io [ROOT]

Fixes: 5e8fd947e2670 ("memory: Rework "info mtree" to print flat views and dispatch trees")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
---
 softmmu/physmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 214cb04c8fc3..cbabd10ac0bf 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -3701,7 +3701,7 @@ void mtree_print_dispatch(AddressSpaceDispatch *d, MemoryRegion *root)
                     " %s%s%s%s%s",
             i,
             s->offset_within_address_space,
-            s->offset_within_address_space + MR_SIZE(s->mr->size),
+            s->offset_within_address_space + MR_SIZE(s->size),
             s->mr->name ? s->mr->name : "(noname)",
             i < ARRAY_SIZE(names) ? names[i] : "",
             s->mr == root ? " [ROOT]" : "",
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] memory: Fix wrong end address dump
  2022-06-22  9:59 [PATCH] memory: Fix wrong end address dump Zhenzhong Duan
@ 2022-06-22 21:05 ` Peter Xu
  2022-07-22  3:31   ` Duan, Zhenzhong
  2022-07-22  6:43 ` David Hildenbrand
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Xu @ 2022-06-22 21:05 UTC (permalink / raw)
  To: Zhenzhong Duan; +Cc: qemu-devel, pbonzini, david, f4bug

On Wed, Jun 22, 2022 at 05:59:12PM +0800, Zhenzhong Duan wrote:
> The end address of memory region section isn't correctly calculated
> which leads to overflowed mtree dump:
> 
>   Dispatch
>     Physical sections
>       ......
>       #70 @0000000000002000..0000000000011fff io [ROOT]
>       #71 @0000000000005000..0000000000005fff (noname)
>       #72 @0000000000005000..0000000000014fff io [ROOT]
>       #73 @0000000000005658..0000000000005658 vmport
>       #74 @0000000000005659..0000000000015658 io [ROOT]
>       #75 @0000000000006000..0000000000015fff io [ROOT]
> 
> After fix:
>       #70 @0000000000002000..0000000000004fff io [ROOT]
>       #71 @0000000000005000..0000000000005fff (noname)
>       #72 @0000000000005000..0000000000005657 io [ROOT]
>       #73 @0000000000005658..0000000000005658 vmport
>       #74 @0000000000005659..0000000000005fff io [ROOT]
>       #75 @0000000000006000..000000000000ffff io [ROOT]
> 
> Fixes: 5e8fd947e2670 ("memory: Rework "info mtree" to print flat views and dispatch trees")
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

-- 
Peter Xu



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] memory: Fix wrong end address dump
  2022-06-22 21:05 ` Peter Xu
@ 2022-07-22  3:31   ` Duan, Zhenzhong
  0 siblings, 0 replies; 6+ messages in thread
From: Duan, Zhenzhong @ 2022-07-22  3:31 UTC (permalink / raw)
  To: Peter Xu; +Cc: qemu-devel, pbonzini, david, f4bug



>-----Original Message-----
>From: Peter Xu <peterx@redhat.com>
>Sent: Thursday, June 23, 2022 5:05 AM
>To: Duan, Zhenzhong <zhenzhong.duan@intel.com>
>Cc: qemu-devel@nongnu.org; pbonzini@redhat.com; david@redhat.com;
>f4bug@amsat.org
>Subject: Re: [PATCH] memory: Fix wrong end address dump
>
>On Wed, Jun 22, 2022 at 05:59:12PM +0800, Zhenzhong Duan wrote:
>> The end address of memory region section isn't correctly calculated
>> which leads to overflowed mtree dump:
>>
>>   Dispatch
>>     Physical sections
>>       ......
>>       #70 @0000000000002000..0000000000011fff io [ROOT]
>>       #71 @0000000000005000..0000000000005fff (noname)
>>       #72 @0000000000005000..0000000000014fff io [ROOT]
>>       #73 @0000000000005658..0000000000005658 vmport
>>       #74 @0000000000005659..0000000000015658 io [ROOT]
>>       #75 @0000000000006000..0000000000015fff io [ROOT]
>>
>> After fix:
>>       #70 @0000000000002000..0000000000004fff io [ROOT]
>>       #71 @0000000000005000..0000000000005fff (noname)
>>       #72 @0000000000005000..0000000000005657 io [ROOT]
>>       #73 @0000000000005658..0000000000005658 vmport
>>       #74 @0000000000005659..0000000000005fff io [ROOT]
>>       #75 @0000000000006000..000000000000ffff io [ROOT]
>>
>> Fixes: 5e8fd947e2670 ("memory: Rework "info mtree" to print flat views
>> and dispatch trees")
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>
>Reviewed-by: Peter Xu <peterx@redhat.com>
Hi,

No progress for a long time, any further comments? Thanks!

Zhenzhong

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] memory: Fix wrong end address dump
  2022-06-22  9:59 [PATCH] memory: Fix wrong end address dump Zhenzhong Duan
  2022-06-22 21:05 ` Peter Xu
@ 2022-07-22  6:43 ` David Hildenbrand
  2022-10-28  2:19   ` Duan, Zhenzhong
  1 sibling, 1 reply; 6+ messages in thread
From: David Hildenbrand @ 2022-07-22  6:43 UTC (permalink / raw)
  To: Zhenzhong Duan, qemu-devel; +Cc: pbonzini, peterx, f4bug

On 22.06.22 11:59, Zhenzhong Duan wrote:
> The end address of memory region section isn't correctly calculated
> which leads to overflowed mtree dump:
> 
>   Dispatch
>     Physical sections
>       ......
>       #70 @0000000000002000..0000000000011fff io [ROOT]
>       #71 @0000000000005000..0000000000005fff (noname)
>       #72 @0000000000005000..0000000000014fff io [ROOT]
>       #73 @0000000000005658..0000000000005658 vmport
>       #74 @0000000000005659..0000000000015658 io [ROOT]
>       #75 @0000000000006000..0000000000015fff io [ROOT]
> 
> After fix:
>       #70 @0000000000002000..0000000000004fff io [ROOT]
>       #71 @0000000000005000..0000000000005fff (noname)
>       #72 @0000000000005000..0000000000005657 io [ROOT]
>       #73 @0000000000005658..0000000000005658 vmport
>       #74 @0000000000005659..0000000000005fff io [ROOT]
>       #75 @0000000000006000..000000000000ffff io [ROOT]
> 
> Fixes: 5e8fd947e2670 ("memory: Rework "info mtree" to print flat views and dispatch trees")
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
> ---
>  softmmu/physmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/softmmu/physmem.c b/softmmu/physmem.c
> index 214cb04c8fc3..cbabd10ac0bf 100644
> --- a/softmmu/physmem.c
> +++ b/softmmu/physmem.c
> @@ -3701,7 +3701,7 @@ void mtree_print_dispatch(AddressSpaceDispatch *d, MemoryRegion *root)
>                      " %s%s%s%s%s",
>              i,
>              s->offset_within_address_space,
> -            s->offset_within_address_space + MR_SIZE(s->mr->size),
> +            s->offset_within_address_space + MR_SIZE(s->size),
>              s->mr->name ? s->mr->name : "(noname)",
>              i < ARRAY_SIZE(names) ? names[i] : "",
>              s->mr == root ? " [ROOT]" : "",

Reviewed-by: David Hildenbrand <david@redhat.com>

I assume this should get picked up soonish.

-- 
Thanks,

David / dhildenb



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] memory: Fix wrong end address dump
  2022-07-22  6:43 ` David Hildenbrand
@ 2022-10-28  2:19   ` Duan, Zhenzhong
  2022-10-28  9:29     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 6+ messages in thread
From: Duan, Zhenzhong @ 2022-10-28  2:19 UTC (permalink / raw)
  To: David Hildenbrand, qemu-devel; +Cc: pbonzini, peterx, f4bug



>-----Original Message-----
>From: David Hildenbrand <david@redhat.com>
>Sent: Friday, July 22, 2022 2:44 PM
>To: Duan, Zhenzhong <zhenzhong.duan@intel.com>; qemu-
>devel@nongnu.org
>Cc: pbonzini@redhat.com; peterx@redhat.com; f4bug@amsat.org
>Subject: Re: [PATCH] memory: Fix wrong end address dump
>
>On 22.06.22 11:59, Zhenzhong Duan wrote:
>> The end address of memory region section isn't correctly calculated
>> which leads to overflowed mtree dump:
>>
>>   Dispatch
>>     Physical sections
>>       ......
>>       #70 @0000000000002000..0000000000011fff io [ROOT]
>>       #71 @0000000000005000..0000000000005fff (noname)
>>       #72 @0000000000005000..0000000000014fff io [ROOT]
>>       #73 @0000000000005658..0000000000005658 vmport
>>       #74 @0000000000005659..0000000000015658 io [ROOT]
>>       #75 @0000000000006000..0000000000015fff io [ROOT]
>>
>> After fix:
>>       #70 @0000000000002000..0000000000004fff io [ROOT]
>>       #71 @0000000000005000..0000000000005fff (noname)
>>       #72 @0000000000005000..0000000000005657 io [ROOT]
>>       #73 @0000000000005658..0000000000005658 vmport
>>       #74 @0000000000005659..0000000000005fff io [ROOT]
>>       #75 @0000000000006000..000000000000ffff io [ROOT]
>>
>> Fixes: 5e8fd947e2670 ("memory: Rework "info mtree" to print flat views
>> and dispatch trees")
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>> ---
>>  softmmu/physmem.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/softmmu/physmem.c b/softmmu/physmem.c index
>> 214cb04c8fc3..cbabd10ac0bf 100644
>> --- a/softmmu/physmem.c
>> +++ b/softmmu/physmem.c
>> @@ -3701,7 +3701,7 @@ void mtree_print_dispatch(AddressSpaceDispatch
>*d, MemoryRegion *root)
>>                      " %s%s%s%s%s",
>>              i,
>>              s->offset_within_address_space,
>> -            s->offset_within_address_space + MR_SIZE(s->mr->size),
>> +            s->offset_within_address_space + MR_SIZE(s->size),
>>              s->mr->name ? s->mr->name : "(noname)",
>>              i < ARRAY_SIZE(names) ? names[i] : "",
>>              s->mr == root ? " [ROOT]" : "",
>
>Reviewed-by: David Hildenbrand <david@redhat.com>
>
>I assume this should get picked up soonish.
Hi Maintainers,

Can this patch be considered merged as it got reviewed-by and no objection for a long time. Thanks.

Zhenzhong

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] memory: Fix wrong end address dump
  2022-10-28  2:19   ` Duan, Zhenzhong
@ 2022-10-28  9:29     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2022-10-28  9:29 UTC (permalink / raw)
  To: Duan, Zhenzhong, David Hildenbrand, qemu-devel; +Cc: pbonzini, peterx

On 28/10/22 04:19, Duan, Zhenzhong wrote:
> 
> 
>> -----Original Message-----
>> From: David Hildenbrand <david@redhat.com>
>> Sent: Friday, July 22, 2022 2:44 PM
>> To: Duan, Zhenzhong <zhenzhong.duan@intel.com>; qemu-
>> devel@nongnu.org
>> Cc: pbonzini@redhat.com; peterx@redhat.com; f4bug@amsat.org
>> Subject: Re: [PATCH] memory: Fix wrong end address dump
>>
>> On 22.06.22 11:59, Zhenzhong Duan wrote:
>>> The end address of memory region section isn't correctly calculated
>>> which leads to overflowed mtree dump:
>>>
>>>    Dispatch
>>>      Physical sections
>>>        ......
>>>        #70 @0000000000002000..0000000000011fff io [ROOT]
>>>        #71 @0000000000005000..0000000000005fff (noname)
>>>        #72 @0000000000005000..0000000000014fff io [ROOT]
>>>        #73 @0000000000005658..0000000000005658 vmport
>>>        #74 @0000000000005659..0000000000015658 io [ROOT]
>>>        #75 @0000000000006000..0000000000015fff io [ROOT]
>>>
>>> After fix:
>>>        #70 @0000000000002000..0000000000004fff io [ROOT]
>>>        #71 @0000000000005000..0000000000005fff (noname)
>>>        #72 @0000000000005000..0000000000005657 io [ROOT]
>>>        #73 @0000000000005658..0000000000005658 vmport
>>>        #74 @0000000000005659..0000000000005fff io [ROOT]
>>>        #75 @0000000000006000..000000000000ffff io [ROOT]
>>>
>>> Fixes: 5e8fd947e2670 ("memory: Rework "info mtree" to print flat views
>>> and dispatch trees")
>>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>>> ---
>>>   softmmu/physmem.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/softmmu/physmem.c b/softmmu/physmem.c index
>>> 214cb04c8fc3..cbabd10ac0bf 100644
>>> --- a/softmmu/physmem.c
>>> +++ b/softmmu/physmem.c
>>> @@ -3701,7 +3701,7 @@ void mtree_print_dispatch(AddressSpaceDispatch
>> *d, MemoryRegion *root)
>>>                       " %s%s%s%s%s",
>>>               i,
>>>               s->offset_within_address_space,
>>> -            s->offset_within_address_space + MR_SIZE(s->mr->size),
>>> +            s->offset_within_address_space + MR_SIZE(s->size),
>>>               s->mr->name ? s->mr->name : "(noname)",
>>>               i < ARRAY_SIZE(names) ? names[i] : "",
>>>               s->mr == root ? " [ROOT]" : "",
>>
>> Reviewed-by: David Hildenbrand <david@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>> I assume this should get picked up soonish.
> Hi Maintainers,
> 
> Can this patch be considered merged as it got reviewed-by and no objection for a long time. Thanks.

That dropped through the cracks, sorry.

Paolo, except if you are planning another PR before soft-freeze, I'm
queuing this single patch via the mips-next PR I'm backing.

Thanks,

Phil.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-28  9:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  9:59 [PATCH] memory: Fix wrong end address dump Zhenzhong Duan
2022-06-22 21:05 ` Peter Xu
2022-07-22  3:31   ` Duan, Zhenzhong
2022-07-22  6:43 ` David Hildenbrand
2022-10-28  2:19   ` Duan, Zhenzhong
2022-10-28  9:29     ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.