]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen/balloon: pre-allocate p2m entries for ballooned pages
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 22 Jul 2015 13:50:37 +0000 (14:50 +0100)
committerJoao Martins <joao.m.martins@oracle.com>
Sun, 27 Mar 2016 01:01:02 +0000 (02:01 +0100)
commitf56e7fc06466dcce162b58e400cf847b21db95fa
treeb9b6fb3a3dc08119641dbc48ba2bc41598064cdb
parent509d7ef38b495607f8283287efafd48f94d3789f
xen/balloon: pre-allocate p2m entries for ballooned pages

Pages returned by alloc_xenballooned_pages() will be used for grant
mapping which will call set_phys_to_machine() (in PV guests).

Ballooned pages are set as INVALID_P2M_ENTRY in the p2m and thus may
be using the (shared) missing tables and a subsequent
set_phys_to_machine() will need to allocate new tables.

Since the grant mapping may be done from a context that cannot sleep,
the p2m entries must already be allocated.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
(cherry picked from commit 4a69c909deb0dd3cae653d14ac0ff52d5440a19c)
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
drivers/xen/balloon.c