From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Make ballooning work with maxmem > mem (i386 version)
Date: Fri, 10 Nov 2006 11:24:07 -0200 [thread overview]
Message-ID: <20061110132407.GC32562@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
Trying to start a guest with maxmem > mem and then balloon up to a value
greater than mem is currently failing. This have been already discovered
(patch sent some days ago) for x86_64. i386 suffers from the same
problem.
This patch fixes it.
--
Glauber de Oliveira Costa
Red Hat Inc.
"Free as in Freedom"
[-- Attachment #2: xen-balloon-i386.patch --]
[-- Type: text/plain, Size: 1456 bytes --]
# HG changeset patch
# User Glauber de Oliveira Costa <gcosta@redhat.com>
# Node ID 2e2e6a3f9b2d0ad21c666dfbdc075f918e0bc7be
# Parent 20204db0891b0b7c10959822e3283656c3600500
[LINUX] Extend physical mapping to maxmem instead of mem - i386 version
As currently physical mapping only reaches the initial reservation,
we're unable to balloon up to more than mem (even when maxmem > mem)
in any situation. This have already been found out to be broken and fixed
in x86_64
Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com>
diff -r 20204db0891b -r 2e2e6a3f9b2d linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h Thu Nov 2 18:52:04 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h Fri Nov 10 13:14:14 2006
@@ -13,6 +13,7 @@
{
int rc;
struct xen_memory_map memmap;
+ unsigned long arg = DOMID_SELF;
/*
* This is rather large for a stack variable but this early in
* the boot process we know we have plenty slack space.
@@ -26,6 +27,11 @@
if ( rc == -ENOSYS ) {
memmap.nr_entries = 1;
map[0].addr = 0ULL;
+ rc = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &arg);
+ if ( rc < 0 )
+ map[0].size = PFN_PHYS(xen_start_info->nr_pages);
+ else
+ map[0].size = PFN_PHYS(rc);
map[0].size = PFN_PHYS(xen_start_info->nr_pages);
/* 8MB slack (to balance backend allocations). */
map[0].size += 8ULL << 20;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2006-11-10 13:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-10 13:24 Glauber de Oliveira Costa [this message]
[not found] ` <C17A49E3.4537%keir@xensource.com>
2006-11-10 15:33 ` [PATCH] Make ballooning work with maxmem > mem (i386 version) Glauber de Oliveira Costa
2006-11-10 15:43 ` Keir Fraser
2006-11-10 15:54 ` Daniel P. Berrange
2006-11-10 15:57 ` Keir Fraser
2006-11-10 16:10 ` Glauber de Oliveira Costa
2006-11-10 16:16 ` Keir Fraser
2006-11-10 20:27 ` Glauber de Oliveira Costa
2006-11-11 0:08 ` Keir Fraser
2006-11-10 15:44 ` Keir Fraser
2006-11-10 15:50 ` Daniel P. Berrange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061110132407.GC32562@redhat.com \
--to=gcosta@redhat.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.