Grant table: fix a bug when grant copying a previous grant mapped page.
authorWei Liu <wei.liu2@citrix.com>
Thu, 1 Mar 2012 16:37:18 +0000 (16:37 +0000)
committerWei Liu <wei.liu2@citrix.com>
Thu, 1 Mar 2012 16:37:18 +0000 (16:37 +0000)
In grant table version 2, when we create a non-transitive mapping from
DomU to Dom0, we need to set active entry's trans_domain and
trans_ref.  Otherwise when we grant copy from this previous mapped
ref, preemption count will get messed up.

See changeset 22994:299ed79acecf for more information.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/common/grant_table.c

index 4d637833d6973c58f6a2c727653601de5569c14e..28a256197e7a3174ada7fa264d09cf746f49a047 100644 (file)
@@ -585,6 +585,8 @@ __gnttab_map_grant_ref(
             act->start = 0;
             act->length = PAGE_SIZE;
             act->is_sub_page = 0;
+            act->trans_domain = rd;
+            act->trans_gref = op->ref;
         }
     }