summaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/balloon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c
index 25fd1bd949d8..f56662324a47 100644
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -602,6 +602,11 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages)
page = balloon_retrieve(true);
if (page) {
pages[pgno++] = page;
+#ifdef CONFIG_XEN_HAVE_PVMMU
+ ret = xen_alloc_p2m_entry(page_to_pfn(page));
+ if (ret < 0)
+ goto out_undo;
+#endif
} else {
ret = add_ballooned_pages(nr_pages - pgno);
if (ret < 0)