From: Jan Beulich Date: Fri, 5 Apr 2019 13:41:24 +0000 (+0200) Subject: x86/gnttab: relax a get_gfn() invocation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=85c88765b366973610c2ebe43df7f0f28deec44f;p=people%2Fsstabellini%2Fxen-unstable.git%2F.git x86/gnttab: relax a get_gfn() invocation In the case here only a query is intended, i.e. without populating a possible PoD or paged out entry, as the intention is to replace the current (grant) entry anyway. Use get_gfn_query() there instead. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- diff --git a/xen/arch/x86/hvm/grant_table.c b/xen/arch/x86/hvm/grant_table.c index ecd7d078ab..f18582f5a6 100644 --- a/xen/arch/x86/hvm/grant_table.c +++ b/xen/arch/x86/hvm/grant_table.c @@ -59,7 +59,7 @@ int replace_grant_p2m_mapping(uint64_t addr, mfn_t frame, if ( new_addr != 0 || (flags & GNTMAP_contains_pte) ) return GNTST_general_error; - old_mfn = get_gfn(d, gfn, &type); + old_mfn = get_gfn_query(d, gfn, &type); if ( !p2m_is_grant(type) || !mfn_eq(old_mfn, frame) ) { put_gfn(d, gfn);