diff options
author | Jennifer Herbert <jennifer.herbert@citrix.com> | 2014-12-24 14:17:06 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2015-01-28 14:03:12 +0000 |
commit | 8da7633f168b5428e2cfb7342408b2c44088f5df (patch) | |
tree | 33e17f065d1aa9bf8a57ac03b737154bac0d3468 /arch/x86/xen | |
parent | ff4b156f166b3931894d2a8b5cdba6cdf4da0618 (diff) | |
download | op-kernel-dev-8da7633f168b5428e2cfb7342408b2c44088f5df.zip op-kernel-dev-8da7633f168b5428e2cfb7342408b2c44088f5df.tar.gz |
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')
-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 a8691cb..f18fd1d 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) |