]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Vrabel <david.vrabel@citrix.com>
Fri, 4 Jul 2014 14:17:43 +0000 (15:17 +0100)
commitbcaf70f52dc98ee3c9bc335639a3a007d6e9de28
tree69ecefd1159a702c86c8823d54c171a09524ce65
parentf7c40c6f7d9201c6d3e27cc3794cff1164edf5d3
xen/balloon: set ballooned out pages as invalid in p2m

Since d42011d19f0972b535bba789ea14d29a8e1eead7 (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>
Cc: <stable@vger.kernel.org>
drivers/xen/balloon.c