aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/xen/p2m.c
diff options
context:
space:
mode:
authorJennifer Herbert <jennifer.herbert@citrix.com>2014-12-24 14:17:06 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2015-01-28 14:03:12 +0000
commit8da7633f168b5428e2cfb7342408b2c44088f5df (patch)
tree33e17f065d1aa9bf8a57ac03b737154bac0d3468 /arch/x86/xen/p2m.c
parentxen/grant-table: add helpers for allocating pages (diff)
downloadwireguard-linux-8da7633f168b5428e2cfb7342408b2c44088f5df.tar.xz
wireguard-linux-8da7633f168b5428e2cfb7342408b2c44088f5df.zip
xen: mark grant mapped pages as foreign
Use the "foreign" page flag to mark pages that have a grant map. Use page->private to store information of the grant (the granting domain and the grant reference). Signed-off-by: Jennifer Herbert <jennifer.herbert@citrix.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'arch/x86/xen/p2m.c')
-rw-r--r--arch/x86/xen/p2m.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index a8691cb08420..f18fd1d411f6 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -681,12 +681,8 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
}
pfn = page_to_pfn(pages[i]);
- WARN_ON(PagePrivate(pages[i]));
WARN(pfn_to_mfn(pfn) != INVALID_P2M_ENTRY, "page must be ballooned");
- SetPagePrivate(pages[i]);
- set_page_private(pages[i], mfn);
-
if (unlikely(!set_phys_to_machine(pfn, FOREIGN_FRAME(mfn)))) {
ret = -ENOMEM;
goto out;
@@ -716,9 +712,6 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,
goto out;
}
- set_page_private(pages[i], INVALID_P2M_ENTRY);
- WARN_ON(!PagePrivate(pages[i]));
- ClearPagePrivate(pages[i]);
set_phys_to_machine(pfn, INVALID_P2M_ENTRY);
}
if (kunmap_ops)