Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1218872 > unrolled thread

[PATCH] xen: limit memory to architectural maximum

Started byJuergen Gross <jgross@suse.com>
First post2015-09-04 14:20 +0200
Last post2015-09-04 18:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] xen: limit memory to architectural maximum Juergen Gross <jgross@suse.com> - 2015-09-04 14:20 +0200
    Re: [Xen-devel] [PATCH] xen: limit memory to architectural maximum Roger Pau Monné <roger.pau@citrix.com> - 2015-09-04 16:20 +0200
    Re: [Xen-devel] [PATCH] xen: limit memory to architectural maximum David Vrabel <david.vrabel@citrix.com> - 2015-09-04 18:00 +0200

#1218872 — [PATCH] xen: limit memory to architectural maximum

FromJuergen Gross <jgross@suse.com>
Date2015-09-04 14:20 +0200
Subject[PATCH] xen: limit memory to architectural maximum
Message-ID<q4Y8i-1MD-5@gated-at.bofh.it>
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1219081 — Re: [Xen-devel] [PATCH] xen: limit memory to architectural maximum

FromRoger Pau Monné <roger.pau@citrix.com>
Date2015-09-04 16:20 +0200
SubjectRe: [Xen-devel] [PATCH] xen: limit memory to architectural maximum
Message-ID<q500p-4vH-3@gated-at.bofh.it>
In reply to#1218872
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>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1219135 — Re: [Xen-devel] [PATCH] xen: limit memory to architectural maximum

FromDavid Vrabel <david.vrabel@citrix.com>
Date2015-09-04 18:00 +0200
SubjectRe: [Xen-devel] [PATCH] xen: limit memory to architectural maximum
Message-ID<q51zc-6zE-9@gated-at.bofh.it>
In reply to#1218872
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web