* [PATCH] xen: limit memory to architectural maximum
@ 2015-09-04 12:18 Juergen Gross
2015-09-04 14:08 ` [Xen-devel] " Roger Pau Monné
2015-09-04 15:43 ` David Vrabel
0 siblings, 2 replies; 3+ messages in thread
From: Juergen Gross @ 2015-09-04 12:18 UTC (permalink / raw)
To: linux-kernel, xen-devel, konrad.wilk, david.vrabel,
boris.ostrovsky
Cc: Juergen Gross
When a pv-domain (including dom0) is started it tries to size it's
p2m list according to the maximum possible memory amount it ever can
achieve. Limit the initial maximum memory size to the architectural
limit of the hardware in order to avoid overflows during remapping
of memory.
This problem will occur when dom0 is started with an initial memory
size being a multiple of 1GB, but without specifying it's maximum
memory size. The kernel must be configured without
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG for the problem to happen.
Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/xen/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 4765285..f5ef674 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -537,7 +537,7 @@ static unsigned long __init xen_get_pages_limit(void)
#ifdef CONFIG_X86_32
limit = GB(64) / PAGE_SIZE;
#else
- limit = ~0ul;
+ limit = MAXMEM / PAGE_SIZE;
if (!xen_initial_domain() && xen_512gb_limit)
limit = GB(512) / PAGE_SIZE;
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Xen-devel] [PATCH] xen: limit memory to architectural maximum
2015-09-04 12:18 [PATCH] xen: limit memory to architectural maximum Juergen Gross
@ 2015-09-04 14:08 ` Roger Pau Monné
2015-09-04 15:43 ` David Vrabel
1 sibling, 0 replies; 3+ messages in thread
From: Roger Pau Monné @ 2015-09-04 14:08 UTC (permalink / raw)
To: Juergen Gross, linux-kernel, xen-devel, konrad.wilk, david.vrabel,
boris.ostrovsky
El 04/09/15 a les 14.18, Juergen Gross ha escrit:
> When a pv-domain (including dom0) is started it tries to size it's
> p2m list according to the maximum possible memory amount it ever can
> achieve. Limit the initial maximum memory size to the architectural
> limit of the hardware in order to avoid overflows during remapping
> of memory.
>
> This problem will occur when dom0 is started with an initial memory
> size being a multiple of 1GB, but without specifying it's maximum
> memory size. The kernel must be configured without
> CONFIG_XEN_BALLOON_MEMORY_HOTPLUG for the problem to happen.
>
> Reported-by: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xen-devel] [PATCH] xen: limit memory to architectural maximum
2015-09-04 12:18 [PATCH] xen: limit memory to architectural maximum Juergen Gross
2015-09-04 14:08 ` [Xen-devel] " Roger Pau Monné
@ 2015-09-04 15:43 ` David Vrabel
1 sibling, 0 replies; 3+ messages in thread
From: David Vrabel @ 2015-09-04 15:43 UTC (permalink / raw)
To: Juergen Gross, linux-kernel, xen-devel, konrad.wilk, david.vrabel,
boris.ostrovsky
On 04/09/15 13:18, Juergen Gross wrote:
> When a pv-domain (including dom0) is started it tries to size it's
> p2m list according to the maximum possible memory amount it ever can
> achieve. Limit the initial maximum memory size to the architectural
> limit of the hardware in order to avoid overflows during remapping
> of memory.
>
> This problem will occur when dom0 is started with an initial memory
> size being a multiple of 1GB, but without specifying it's maximum
> memory size. The kernel must be configured without
> CONFIG_XEN_BALLOON_MEMORY_HOTPLUG for the problem to happen.
Applied to for-linus-4.3, thanks.
David
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-04 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-04 12:18 [PATCH] xen: limit memory to architectural maximum Juergen Gross
2015-09-04 14:08 ` [Xen-devel] " Roger Pau Monné
2015-09-04 15:43 ` David Vrabel
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).