Skip to content
Commit fb9a0c44 authored by David Vrabel's avatar David Vrabel
Browse files

xen/balloon: set ballooned out pages as invalid in p2m

Since cd9151e2

 (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: default avatarDavid Vrabel <david.vrabel@citrix.com>
Reported-by: default avatarMarek Marczykowski <marmarek@invisiblethingslab.com>
Tested-by: default avatarMarek Marczykowski <marmarek@invisiblethingslab.com>
Acked-by: default avatarStefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: <stable@vger.kernel.org>
parent 1b647823
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment