]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/balloon: set ballooned out pages as invalid in p2m
authorDavid Vrabel <david.vrabel@citrix.com>
Fri, 27 Jun 2014 09:42:03 +0000 (10:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jul 2014 15:08:20 +0000 (08:08 -0700)
commit2b37ed20d030836d3d341d71b1f735bd740e6047
treeffc73d0a827a8e58b3eaf393d0afda289d3214ae
parente3f5055a5e01daa5587ef2285423be77cb94d463
xen/balloon: set ballooned out pages as invalid in p2m

commit fb9a0c443691ceaab3daba966bbbd9f5ff3aa26f upstream.

Since cd9151e26d31048b2b5e00fd02e110e07d2200c9 (xen/balloon: set a
mapping for ballooned out pages), a ballooned out page had its entry
in the p2m set to the MFN of one of the scratch pages.  This means
that the p2m will contain many entries pointing to the same MFN.

During a domain save, these many-to-one entries are not identified as
such and the scratch page is saved multiple times. On restore the
ballooned pages are populated with new frames and the domain may use
up its allocation before all pages can be restored.

Since the original fix only needed to keep a mapping for the ballooned
page it is safe to set ballooned out pages as INVALID_P2M_ENTRY in the
p2m (as they were before). Thus preventing them from being saved and
re-populated on restore.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
Tested-by: Marek Marczykowski <marmarek@invisiblethingslab.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/balloon.c