# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1261031275 0
# Node ID 3b29ed4ffb15372ce6fea41dec1b796e2f6fec81
# Parent 410eb65969cb142b8b32490d7f1454859cc3a7f2
Support for Memory paging in grant table mappings.
Signed-off-by: Patrick Colp <Patrick.Colp@xxxxxxxxxx>
---
xen/common/grant_table.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff -r 410eb65969cb -r 3b29ed4ffb15 xen/common/grant_table.c
--- a/xen/common/grant_table.c Thu Dec 17 06:27:55 2009 +0000
+++ b/xen/common/grant_table.c Thu Dec 17 06:27:55 2009 +0000
@@ -1873,7 +1873,15 @@ __gnttab_copy(
}
else
{
- s_frame = gmfn_to_mfn(sd, op->source.u.gmfn);
+ p2m_type_t p2mt;
+ s_frame = mfn_x(gfn_to_mfn(sd, op->source.u.gmfn, &p2mt));
+ if ( p2m_is_paging(p2mt) )
+ {
+ p2m_mem_paging_populate(sd, op->source.u.gmfn);
+
+ rc = -ENOENT;
+ goto error_out;
+ }
source_domain = sd;
}
if ( unlikely(!mfn_valid(s_frame)) )
@@ -1906,7 +1914,15 @@ __gnttab_copy(
}
else
{
- d_frame = gmfn_to_mfn(dd, op->dest.u.gmfn);
+ p2m_type_t p2mt;
+ d_frame = mfn_x(gfn_to_mfn(dd, op->dest.u.gmfn, &p2mt));
+ if ( p2m_is_paging(p2mt) )
+ {
+ p2m_mem_paging_populate(dd, op->dest.u.gmfn);
+
+ rc = -ENOENT;
+ goto error_out;
+ }
dest_domain = dd;
}
if ( unlikely(!mfn_valid(d_frame)) )
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|