xen/arm: p2m: Fix hypercall preemption when domain is relinquish memory mapping
authorJulien Grall <julien.grall@linaro.org>
Wed, 18 Dec 2013 16:54:08 +0000 (16:54 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 18 Dec 2013 16:56:57 +0000 (16:56 +0000)
The commit 84f29a9 "xen/arm: Add relinquish_p2m_mapping to remove reference on
every mapped page" doesn't save correctly the next gfn when the hypercall
is preempted.

Instead of storing the next gfn, it store the next mfn. Fix it by using
'addr' instead of 'maddr'.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/p2m.c

index 3f4ab37915602248b233d64deddc913fa8c5b1bc..d24a6fc7b1e1c030136af904346e7e7846589508 100644 (file)
@@ -366,7 +366,7 @@ static int create_p2m_entries(struct domain *d,
         {
             if ( hypercall_preempt_check() )
             {
-                p2m->next_gfn_to_relinquish = maddr >> PAGE_SHIFT;
+                p2m->next_gfn_to_relinquish = addr >> PAGE_SHIFT;
                 rc = -EAGAIN;
                 goto out;
             }