qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: qemu-devel@nongnu.org
Cc: xen-devel@lists.xensource.com,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	jan.kiszka@siemens.com, avi@redhat.com, anthony@codemonkey.ws,
	Anthony PERARD <anthony.perard@citrix.com>
Subject: [Qemu-devel] [PATCH v7 6/6] xen: do not allocate RAM during INMIGRATE runstate
Date: Fri, 16 Mar 2012 12:13:09 +0000	[thread overview]
Message-ID: <1331899989-7756-6-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203161205460.923@kaball-desktop>

From: Anthony PERARD <anthony.perard@citrix.com>

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
 xen-all.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/xen-all.c b/xen-all.c
index 972cffd..10d53d1 100644
--- a/xen-all.c
+++ b/xen-all.c
@@ -190,6 +190,14 @@ void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, MemoryRegion *mr)
     xen_pfn_t *pfn_list;
     int i;
 
+    if (runstate_check(RUN_STATE_INMIGRATE)) {
+        /* RAM already populated in Xen */
+        fprintf(stderr, "%s: do not alloc "RAM_ADDR_FMT
+                " bytes of ram at "RAM_ADDR_FMT" when runstate is INMIGRATE\n",
+                __func__, size, ram_addr); 
+        return;
+    }
+
     if (mr == &ram_memory) {
         return;
     }
-- 
1.7.2.5

      parent reply	other threads:[~2012-03-16 12:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 12:11 [Qemu-devel] [PATCH v7 0/6] save/restore on Xen Stefano Stabellini
2012-03-16 12:13 ` [Qemu-devel] [PATCH v7 1/6] cirrus_vga: do not reset videoram Stefano Stabellini
2012-03-16 12:13 ` [Qemu-devel] [PATCH v7 2/6] Introduce "save-devices-state" Stefano Stabellini
2012-03-16 15:49   ` Eric Blake
2012-03-16 15:58     ` Anthony Liguori
2012-03-16 16:03       ` Eric Blake
2012-03-19 11:48         ` Stefano Stabellini
2012-03-16 16:13     ` Stefano Stabellini
2012-03-16 17:28     ` Luiz Capitulino
2012-03-16 12:13 ` [Qemu-devel] [PATCH v7 3/6] Set runstate to INMIGRATE earlier Stefano Stabellini
2012-03-16 12:13 ` [Qemu-devel] [PATCH v7 4/6] xen: record physmap changes to xenstore Stefano Stabellini
2012-03-16 12:13 ` [Qemu-devel] [PATCH v7 5/6] xen mapcache: check if memory region has moved Stefano Stabellini
2012-03-16 12:13 ` Stefano Stabellini [this message]

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=1331899989-7756-6-git-send-email-stefano.stabellini@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --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 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).