From: Julien Grall Subject: [PATCH] xen/arm: p2m: Fix hypercall preemption when domain is relinquish memory mapping Date: Wed, 18 Dec 2013 16:54:08 +0000 Message-ID: <1387385648-27618-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VtKO1-0002hI-BH for xen-devel@lists.xenproject.org; Wed, 18 Dec 2013 16:54:17 +0000 Received: by mail-ee0-f53.google.com with SMTP id b57so3679832eek.12 for ; Wed, 18 Dec 2013 08:54:15 -0800 (PST) List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com, patches@linaro.org List-Id: xen-devel@lists.xenproject.org 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 --- xen/arch/arm/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c index 3f4ab37..d24a6fc 100644 --- a/xen/arch/arm/p2m.c +++ b/xen/arch/arm/p2m.c @@ -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; } -- 1.7.10.4