From: Keir Fraser Date: Thu, 17 Dec 2009 06:27:55 +0000 (+0000) Subject: Support for Memory paging in grant table mappings. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12871 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f2a7d5963e57679977397a44294e421a89693eb1;p=xen.git Support for Memory paging in grant table mappings. Signed-off-by: Patrick Colp --- diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index cfcae99aca..e56cb6f1e7 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -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)) )