From e09b7cbbdc5675d5237be5cd46fbcc55ffa64a4d Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 1 Mar 2012 16:37:18 +0000 Subject: [PATCH] Grant table: fix a bug when grant copying a previous grant mapped page. 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 Committed-by: Keir Fraser --- xen/common/grant_table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 4d637833d6..28a256197e 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -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; } } -- 2.39.5