All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] xen: Fix emfn calculation in init_domheap_pages()
@ 2018-04-16 11:29 Oleksandr Tyshchenko
  2018-04-16 11:52 ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Oleksandr Tyshchenko @ 2018-04-16 11:29 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Oleksandr Tyshchenko, Julien Grall,
	Jan Beulich, xen-devel

From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

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

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
CC: George Dunlap <George.Dunlap@eu.citrix.com>
CC: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Jan Beulich <jbeulich@suse.com>
CC: Julien Grall <julien.grall@arm.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
CC: xen-devel@lists.xen.org
---
 xen/common/page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c
index 186b39a..20ee1e4 100644
--- a/xen/common/page_alloc.c
+++ b/xen/common/page_alloc.c
@@ -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;
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH v1] xen: Fix emfn calculation in init_domheap_pages()
  2018-04-16 11:29 [PATCH v1] xen: Fix emfn calculation in init_domheap_pages() Oleksandr Tyshchenko
@ 2018-04-16 11:52 ` Jan Beulich
  2018-04-16 11:54   ` Jan Beulich
       [not found]   ` <5AD48F1002000078001BBA84@suse.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Beulich @ 2018-04-16 11:52 UTC (permalink / raw)
  To: olekstysh
  Cc: Tim Deegan, Stefano Stabellini, Wei Liu, George Dunlap,
	Andrew Cooper, Ian Jackson, xen-devel, oleksandr_tyshchenko,
	Julien Grall, xen-devel

>>> On 16.04.18 at 13:29, <olekstysh@gmail.com> wrote:
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> 
> 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
> 
> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH v1] xen: Fix emfn calculation in init_domheap_pages()
  2018-04-16 11:52 ` Jan Beulich
@ 2018-04-16 11:54   ` Jan Beulich
       [not found]   ` <5AD48F1002000078001BBA84@suse.com>
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2018-04-16 11:54 UTC (permalink / raw)
  To: olekstysh
  Cc: Juergen Gross, Stefano Stabellini, Wei Liu, George Dunlap,
	Andrew Cooper, Ian Jackson, Tim Deegan, oleksandr_tyshchenko,
	Julien Grall, xen-devel

>>> On 16.04.18 at 13:52, <JBeulich@suse.com> wrote:
>>>> On 16.04.18 at 13:29, <olekstysh@gmail.com> wrote:
>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>> 
>> 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
>> 
>> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
> 
> Reviewed-by: Jan Beulich <jbeulich@suse.com>

Oh, and Cc Jürgen.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH v1] xen: Fix emfn calculation in init_domheap_pages()
       [not found]   ` <5AD48F1002000078001BBA84@suse.com>
@ 2018-04-16 11:56     ` Juergen Gross
  2018-04-16 12:20       ` Oleksandr Tyshchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2018-04-16 11:56 UTC (permalink / raw)
  To: Jan Beulich, olekstysh
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Oleksandr Tyshchenko, Julien Grall,
	xen-devel

On 16/04/18 13:54, Jan Beulich wrote:
>>>> On 16.04.18 at 13:52, <JBeulich@suse.com> wrote:
>>>>> On 16.04.18 at 13:29, <olekstysh@gmail.com> wrote:
>>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>>>
>>> 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
>>>
>>> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>>
>> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> 
> Oh, and Cc Jürgen.

Thanks, just saw it myself. :-)

Release-acked-by: Juergen Gross <jgross@suse.com>


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH v1] xen: Fix emfn calculation in init_domheap_pages()
  2018-04-16 11:56     ` Juergen Gross
@ 2018-04-16 12:20       ` Oleksandr Tyshchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Oleksandr Tyshchenko @ 2018-04-16 12:20 UTC (permalink / raw)
  To: Juergen Gross, Jan Beulich
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Oleksandr Tyshchenko, Julien Grall,
	xen-devel

On Mon, Apr 16, 2018 at 2:56 PM, Juergen Gross <jgross@suse.com> wrote:
> On 16/04/18 13:54, Jan Beulich wrote:
>>>>> On 16.04.18 at 13:52, <JBeulich@suse.com> wrote:
>>>>>> On 16.04.18 at 13:29, <olekstysh@gmail.com> wrote:
>>>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>>>>
>>>> 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
>>>>
>>>> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
>>>
>>> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>>
>> Oh, and Cc Jürgen.
>
> Thanks, just saw it myself. :-)
>
> Release-acked-by: Juergen Gross <jgross@suse.com>
>
>
> Juergen

Thank you.


-- 
Regards,

Oleksandr Tyshchenko

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2018-04-16 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 11:29 [PATCH v1] xen: Fix emfn calculation in init_domheap_pages() Oleksandr Tyshchenko
2018-04-16 11:52 ` Jan Beulich
2018-04-16 11:54   ` Jan Beulich
     [not found]   ` <5AD48F1002000078001BBA84@suse.com>
2018-04-16 11:56     ` Juergen Gross
2018-04-16 12:20       ` Oleksandr Tyshchenko

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.