From patchwork Wed Dec 18 16:54:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 22626 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 62ECE23FBE for ; Wed, 18 Dec 2013 16:54:18 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id at1sf27774971iec.11 for ; Wed, 18 Dec 2013 08:54:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=2eEbezKOEatKIr/9YCSRZsBHIiz3/C7FESfsZ4cKAuw=; b=ld9yDLoF0AbYFLx8afrC3cgEhk5ZYL8Zufs7Lb0uWsUY6k9iz83qBpyQ6HgexaBgJD OpZmpEzwyFDN0Srgiml8Y3njz+ISaxXI6LaURWYMRXQ4P5WRg8HIM4aMqL4DvMbmGwFL +tPpyH5nvl6PdoWiBgOO/MApd6UMLKK6CT8r4LT3Ch4/P6Bsh01xYijY6Ngz3N3wUdWB QwO9kyugEIbUr3InaZUp4QgdLecZI5gZBdgbRDKnKaSW+LY5yZ9ywZMNzbb7p7qC1dW/ Ekf0lQ9jjHpbrkC9iIniXMFGf3nJ4c/tPV3NeS0aJ7IPMcWqVvkXx1uY9NpRBW9zP/wm gYLQ== X-Gm-Message-State: ALoCoQmXeH1KwiTH+d0Wt5urT0aw3aoSIqtumk8FJAlw+iLulkrxadrwaMO9wYj/iD+8lyo0M1uS X-Received: by 10.50.3.40 with SMTP id 8mr3937208igz.1.1387385657541; Wed, 18 Dec 2013 08:54:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.108 with SMTP id g12ls112151qej.81.gmail; Wed, 18 Dec 2013 08:54:17 -0800 (PST) X-Received: by 10.220.5.133 with SMTP id 5mr156166vcv.73.1387385657405; Wed, 18 Dec 2013 08:54:17 -0800 (PST) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id qy6si118918vcb.76.2013.12.18.08.54.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Dec 2013 08:54:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.170; Received: by mail-ve0-f170.google.com with SMTP id oy12so5540940veb.1 for ; Wed, 18 Dec 2013 08:54:17 -0800 (PST) X-Received: by 10.220.159.4 with SMTP id h4mr13636005vcx.1.1387385657315; Wed, 18 Dec 2013 08:54:17 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.59.13.131 with SMTP id ey3csp256782ved; Wed, 18 Dec 2013 08:54:16 -0800 (PST) X-Received: by 10.15.82.8 with SMTP id z8mr30362181eey.25.1387385656128; Wed, 18 Dec 2013 08:54:16 -0800 (PST) Received: from mail-ea0-f169.google.com (mail-ea0-f169.google.com [209.85.215.169]) by mx.google.com with ESMTPS id e2si824517eeg.93.2013.12.18.08.54.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Dec 2013 08:54:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.169 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.215.169; Received: by mail-ea0-f169.google.com with SMTP id l9so3156097eaj.28 for ; Wed, 18 Dec 2013 08:54:15 -0800 (PST) X-Received: by 10.15.21.205 with SMTP id d53mr21749506eeu.106.1387385655659; Wed, 18 Dec 2013 08:54:15 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id h3sm1568166eem.15.2013.12.18.08.54.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Dec 2013 08:54:13 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: patches@linaro.org, ian.campbell@citrix.com, tim@xen.org, stefano.stabellini@citrix.com, 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> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.170 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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; }