]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
x86/gnttab: relax a get_gfn() invocation
authorJan Beulich <jbeulich@suse.com>
Fri, 5 Apr 2019 13:41:24 +0000 (15:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Apr 2019 13:41:24 +0000 (15:41 +0200)
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 <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/grant_table.c

index ecd7d078ab057e014d3eb76b7e80828fdfc90ba4..f18582f5a663c2de7733305f3228e810af2b1101 100644 (file)
@@ -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);