memory: Fix wrong end address dump
PATCH 1/1 memory: Fix wrong end address dump
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]--- softmmu/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
softmmu/physmem.c +1 -1
@@ -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]" : "",
Signature · 1 line
2.25.1
Quoted 21 lines · Zhenzhong Duan
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]
Quoted 2 lines
Fixes 5e8fd947e2670 ("memory: Rework "info mtree" to print flat views and dispatch trees")Signed-off-by Zhenzhong Duan <[email protected]>
Signature · 1 line
Peter Xu
Quoted 32 lines
-----Original Message-----
From: Peter Xu <[email protected]>
Sent: Thursday, June 23, 2022 5:05 AM
To: Duan, Zhenzhong <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] memory: Fix wrong end address dumpQuoted 21 lines · Zhenzhong Duan
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]
Quoted 5 lines
Quoted 3 lines
Fixes 5e8fd947e2670 ("memory: Rework "info mtree" to print flat viewsand dispatch trees")
Signed-off-by Zhenzhong Duan <[email protected]>Reviewed-by Peter Xu <[email protected]>
Hi,
No progress for a long time, any further comments? Thanks!
Zhenzhong
Quoted 32 lines · Zhenzhong Duan
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 <[email protected]>--- softmmu/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)softmmu/physmem.c +0
-0
softmmu/physmem.c void mtree_print_dispatch(AddressSpaceDispatch *d, MemoryRegion *root) · line 3707
Quoted 8 lines
softmmu/physmem.c +1
-1@@ -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]" : "",
I assume this should get picked up soonish.
Signature · 3 lines
Thanks, David / dhildenb
Quoted 54 lines
-----Original Message-----
From: David Hildenbrand <[email protected]>
Sent: Friday, July 22, 2022 2:44 PM
To: Duan, Zhenzhong <[email protected]>; qemu- [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] memory: Fix wrong end address dumpsoftmmu/physmem.c void mtree_print_dispatch(AddressSpaceDispatch
Quoted 33 lines · Zhenzhong Duan
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 viewsand dispatch trees")
Signed-off-by Zhenzhong Duan <[email protected]>--- softmmu/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)softmmu/physmem.c index renamed from softmmu/physmem.c +0
-0
214cb04c8fc3..cbabd10ac0bf100644softmmu/physmem.c +0
-0@@ -3701,7 +3701,7 @@ void mtree_print_dispatch(AddressSpaceDispatch*d, MemoryRegion *root)
softmmu/physmem.c void mtree_print_dispatch(AddressSpaceDispatch *d, MemoryRegion *root) · line 3707
Quoted 8 lines
softmmu/physmem.c +1
-1" %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]" : "",
Quoted 3 lines
Reviewed-by David Hildenbrand <[email protected]>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
Philippe Mathieu-Daudé
Reviewed-byQuoted 54 lines · Zhenzhong
Quoted 54 lines
-----Original Message-----
From: David Hildenbrand <[email protected]>
Sent: Friday, July 22, 2022 2:44 PM
To: Duan, Zhenzhong <[email protected]>; qemu- [email protected]
Cc: [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] memory: Fix wrong end address dumpsoftmmu/physmem.c void mtree_print_dispatch(AddressSpaceDispatch
Quoted 33 lines · Zhenzhong Duan
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 viewsand dispatch trees")
Signed-off-by Zhenzhong Duan <[email protected]>--- softmmu/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)softmmu/physmem.c index renamed from softmmu/physmem.c +0
-0
214cb04c8fc3..cbabd10ac0bf100644softmmu/physmem.c +0
-0@@ -3701,7 +3701,7 @@ void mtree_print_dispatch(AddressSpaceDispatch*d, MemoryRegion *root)
Quoted 8 lines
softmmu/physmem.c +1
-1" %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]" : "",
Quoted 1 line
Quoted 1 line
Reviewed-by David Hildenbrand <[email protected]>
Quoted 4 lines
Quoted 1 line
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.