diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index b7bfd4d928..39ee480bd7 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -736,10 +736,13 @@ __gnttab_map_grant_ref( goto undo_out; } - rc = create_grant_host_mapping( - op->host_addr, frame, op->flags, cache_flags); - if ( rc != GNTST_okay ) - goto undo_out; + if ( op->flags & GNTMAP_host_map ) + { + rc = create_grant_host_mapping(op->host_addr, frame, op->flags, + cache_flags); + if ( rc != GNTST_okay ) + goto undo_out; + } } else if ( owner == rd || owner == dom_cow ) {