Skip to contentSkip to conversation

xen: Fix emfn calculation in init_domheap_pages()

PATCH In review Oleksandr Tyshchenko 3 participants 5 messages Apr 16, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: Fix emfn calculation in init_domheap_pages()

From: Oleksandr Tyshchenko <[email protected]>

The "end" address must be rounded down before shifting, otherwise we will insert wrong page range to a heap if address isn't page aligned.

It seems that a copy-paste mistake took place in the following commit:
0c12972e34b20a26f2b42044b98bf12db7ed62b6
xen/mm: Switch some of page_alloc.c to typesafe MFN

CC Andrew Cooper <[email protected]>
CC George Dunlap <[email protected]>
CC Ian Jackson <[email protected]>
CC Jan Beulich <[email protected]>
CC Julien Grall <[email protected]>
CC Konrad Rzeszutek Wilk <[email protected]>
CC Stefano Stabellini <[email protected]>
CC Tim Deegan <[email protected]>
CC Wei Liu <[email protected]>
---
 xen/common/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/page_alloc.c +1 -1
index 186b39a..20ee1e4 100644
@@ -2166,7 +2166,7 @@ void init_domheap_pages(paddr_t ps, paddr_t pe)
     ASSERT(!in_irq());
 
     smfn = maddr_to_mfn(round_pgup(ps));
-    emfn = maddr_to_mfn(round_pgup(pe));
+    emfn = maddr_to_mfn(round_pgdown(pe));
 
     if ( mfn_x(emfn) <= mfn_x(smfn) )
         return;
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 16.04.18 at 13:29, <[email protected]> wrote:

From: Oleksandr Tyshchenko <[email protected]>

The "end" address must be rounded down before shifting, otherwise we will insert wrong page range to a heap if address isn't page aligned.

Quoted 5 lines

It seems that a copy-paste mistake took place in the following commit:
0c12972e34b20a26f2b42044b98bf12db7ed62b6
xen/mm: Switch some of page_alloc.c to typesafe MFN

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines · On 16.04.18 at 13:52, <[email protected]> wrote:
Quoted 1 line · On 16.04.18 at 13:29, <[email protected]> wrote:

From: Oleksandr Tyshchenko <[email protected]>

The "end" address must be rounded down before shifting, otherwise we will insert wrong page range to a heap if address isn't page aligned.

Quoted 7 lines
Quoted 5 lines

It seems that a copy-paste mistake took place in the following commit:
0c12972e34b20a26f2b42044b98bf12db7ed62b6
xen/mm: Switch some of page_alloc.c to typesafe MFN

Oh, and Cc Jürgen.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 12 lines · Jan Beulich
Quoted 12 lines
Quoted 12 lines
Quoted 2 lines · On 16.04.18 at 13:52, <[email protected]> wrote:
Quoted 1 line · On 16.04.18 at 13:29, <[email protected]> wrote:

From: Oleksandr Tyshchenko <[email protected]>

The "end" address must be rounded down before shifting, otherwise we will insert wrong page range to a heap if address isn't page aligned.

It seems that a copy-paste mistake took place in the following commit:
0c12972e34b20a26f2b42044b98bf12db7ed62b6
xen/mm: Switch some of page_alloc.c to typesafe MFN

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Oh, and Cc Jürgen.

Thanks, just saw it myself. :-)

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
Quoted 17 lines · Juergen Gross
Quoted 16 lines · Jan Beulich
Quoted 15 lines
Quoted 8 lines
Quoted 2 lines · On 16.04.18 at 13:52, <[email protected]> wrote:
Quoted 1 line · On 16.04.18 at 13:29, <[email protected]> wrote:

From: Oleksandr Tyshchenko <[email protected]>

The "end" address must be rounded down before shifting, otherwise we will insert wrong page range to a heap if address isn't page aligned.

Quoted 5 lines

It seems that a copy-paste mistake took place in the following commit:
0c12972e34b20a26f2b42044b98bf12db7ed62b6
xen/mm: Switch some of page_alloc.c to typesafe MFN

Quoted 8 lines
Quoted 1 line

Oh, and Cc Jürgen.

Thanks, just saw it myself. :-)

Juergen

Thank you.

Signature · 8 lines
Regards,

Oleksandr Tyshchenko

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel