From 85c88765b366973610c2ebe43df7f0f28deec44f Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 5 Apr 2019 15:41:24 +0200 Subject: [PATCH] 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 --- xen/arch/x86/hvm/grant_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2