* [PATCH] xen: arm: Document xenheap_megabytes limitation
@ 2015-07-23 16:31 Chris (Christopher) Brand
2015-07-23 16:49 ` Julien Grall
0 siblings, 1 reply; 3+ messages in thread
From: Chris (Christopher) Brand @ 2015-07-23 16:31 UTC (permalink / raw)
To: xen-devel; +Cc: Keir Fraser, Ian Jackson, Ian Campbell, Jan Beulich, Tim Deegan
In setup_mm(), the value passed as xenheap_megabytes gets
converted to pages and passed to setup_xenheap_mappings(),
which in turn passes it to create_32mb_mappings(), which
contains an ASSERT that the value passed is a multiple of
32MB. So specifying any value that is not an integer multiple
of 32 will cause Xen to hit this assert and fail to boot.
Signed-off-by: Chris Brand <chris.brand@broadcom.com>
---
docs/misc/xen-command-line.markdown | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 4889e27626d4..f3d3bd6ce56a 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -242,7 +242,7 @@ the NMI watchdog is also enabled.
> Default: `0` (1/32 of RAM)
-Amount of RAM to set aside for the Xenheap.
+Amount of RAM to set aside for the Xenheap. Must be an integer multiple of 32.
By default will use 1/32 of the RAM up to a maximum of 1GB and with a
minimum of 32M, subject to a suitably aligned and sized contiguous
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xen: arm: Document xenheap_megabytes limitation
2015-07-23 16:31 [PATCH] xen: arm: Document xenheap_megabytes limitation Chris (Christopher) Brand
@ 2015-07-23 16:49 ` Julien Grall
2015-07-24 11:05 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2015-07-23 16:49 UTC (permalink / raw)
To: Chris (Christopher) Brand, xen-devel
Cc: Ian Jackson, Keir Fraser, Ian Campbell, Jan Beulich, Tim Deegan
Hi Chris,
Thank you for patch.
On 23/07/15 17:31, Chris (Christopher) Brand wrote:
> In setup_mm(), the value passed as xenheap_megabytes gets
> converted to pages and passed to setup_xenheap_mappings(),
> which in turn passes it to create_32mb_mappings(), which
> contains an ASSERT that the value passed is a multiple of
> 32MB. So specifying any value that is not an integer multiple
> of 32 will cause Xen to hit this assert and fail to boot.
>
> Signed-off-by: Chris Brand <chris.brand@broadcom.com>
I wondering if it would worth to add a check in the code to ensure that
it's a multiple of 32MB?
Nonetheless:
Reviewed-by: Julien Grall <julien.grall@citrix.com>
> ---
> docs/misc/xen-command-line.markdown | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
> index 4889e27626d4..f3d3bd6ce56a 100644
> --- a/docs/misc/xen-command-line.markdown
> +++ b/docs/misc/xen-command-line.markdown
> @@ -242,7 +242,7 @@ the NMI watchdog is also enabled.
>
> > Default: `0` (1/32 of RAM)
>
> -Amount of RAM to set aside for the Xenheap.
> +Amount of RAM to set aside for the Xenheap. Must be an integer multiple of 32.
>
> By default will use 1/32 of the RAM up to a maximum of 1GB and with a
> minimum of 32M, subject to a suitably aligned and sized contiguous
>
Regards,
--
Julien Grall
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen: arm: Document xenheap_megabytes limitation
2015-07-23 16:49 ` Julien Grall
@ 2015-07-24 11:05 ` Ian Campbell
0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2015-07-24 11:05 UTC (permalink / raw)
To: Julien Grall, Chris (Christopher) Brand, xen-devel
Cc: Ian Jackson, Keir Fraser, Jan Beulich, Tim Deegan
On Thu, 2015-07-23 at 17:49 +0100, Julien Grall wrote:
> Hi Chris,
>
> Thank you for patch.
>
> On 23/07/15 17:31, Chris (Christopher) Brand wrote:
> > In setup_mm(), the value passed as xenheap_megabytes gets
> > converted to pages and passed to setup_xenheap_mappings(),
> > which in turn passes it to create_32mb_mappings(), which
> > contains an ASSERT that the value passed is a multiple of
> > 32MB. So specifying any value that is not an integer multiple
> > of 32 will cause Xen to hit this assert and fail to boot.
> >
> > Signed-off-by: Chris Brand <chris.brand@broadcom.com>
>
> I wondering if it would worth to add a check in the code to ensure
> that
> it's a multiple of 32MB?
Arguably we have that in the form of the assert/panic, but perhaps
there should be a nicer message.
> Nonetheless:
>
> Reviewed-by: Julien Grall <julien.grall@citrix.com>
Acked + applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-24 11:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23 16:31 [PATCH] xen: arm: Document xenheap_megabytes limitation Chris (Christopher) Brand
2015-07-23 16:49 ` Julien Grall
2015-07-24 11:05 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).