diff options
author | Jennifer Herbert <jennifer.herbert@citrix.com> | 2014-12-24 15:17:06 +0100 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-01-28 15:03:12 +0100 |
commit | 8da7633f168b5428e2cfb7342408b2c44088f5df (patch) | |
tree | 33e17f065d1aa9bf8a57ac03b737154bac0d3468 /arch | |
parent | xen/grant-table: add helpers for allocating pages (diff) | |
download | linux-8da7633f168b5428e2cfb7342408b2c44088f5df.tar.xz 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')
-rw-r--r-- | arch/x86/xen/p2m.c | 7 |
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) |