From patchwork Thu Dec 5 15:42:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 22071 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 62D9323FD0 for ; Thu, 5 Dec 2013 15:42:26 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id id10sf37264218vcb.4 for ; Thu, 05 Dec 2013 07:42:26 -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:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=qMYyOa/qzNzz1mpVUYO34K7aYoTcuuLHgWnLhc1uXI4=; b=YNPS0ENm/lrTQaPx0AhXk8QXGqqEF6cT9EVY8D1xfXvYKMfxNf9xUzuQsZSJaVnW2o qQcd1hlmX5pwVNuVtwiZXC9KrfkxSwh/tJIqy3zSgtd1l7r9U4DboxDTccLJbz0XwKcC ko13mi8JbvUyUXeHs7pS61C7LmC3WO7AI57WJmFp+Bnoh5uLTk6bAAomW4hkHjkpsfVd mpYx7bOCJ9EPVEBq1jB8cXdlTXLaR1fMMC5/nQqzuudRfLtEvZydpoE1sXjApm3ajs/P odEiOLMbuEaeadKNBlg30KVQ2ANfOk7CyaXuEChWA0i8ozHz3KAQ7HQkStocb1M4W9Ux Jqgg== X-Gm-Message-State: ALoCoQlawj+KB8rUMKpbNWb482YUs6VHzOAIHCS5zwNgDjDg14ur+kA4PqF4wn+2cVsjrjWm/L1+ X-Received: by 10.236.165.133 with SMTP id e5mr36538722yhl.31.1386258146210; Thu, 05 Dec 2013 07:42:26 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.35.108 with SMTP id g12ls890322qej.81.gmail; Thu, 05 Dec 2013 07:42:26 -0800 (PST) X-Received: by 10.52.253.235 with SMTP id ad11mr1069271vdd.75.1386258146104; Thu, 05 Dec 2013 07:42:26 -0800 (PST) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id uw1si9827126vdc.97.2013.12.05.07.42.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:42:26 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lf12so12902195vcb.7 for ; Thu, 05 Dec 2013 07:42:26 -0800 (PST) X-Received: by 10.220.74.69 with SMTP id t5mr49585625vcj.18.1386258145888; Thu, 05 Dec 2013 07:42:25 -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.220.174.196 with SMTP id u4csp24825vcz; Thu, 5 Dec 2013 07:42:25 -0800 (PST) X-Received: by 10.180.37.112 with SMTP id x16mr12707604wij.48.1386258145180; Thu, 05 Dec 2013 07:42:25 -0800 (PST) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by mx.google.com with ESMTPS id cs10si778234wib.32.2013.12.05.07.42.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:42:25 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.169 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.212.169; Received: by mail-wi0-f169.google.com with SMTP id hn6so1056010wib.0 for ; Thu, 05 Dec 2013 07:42:24 -0800 (PST) X-Received: by 10.180.98.229 with SMTP id el5mr12467981wib.29.1386258144729; Thu, 05 Dec 2013 07:42:24 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id w20sm7350575wia.5.2013.12.05.07.42.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Dec 2013 07:42:23 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Cc: patches@linaro.org, ian.campbell@citrix.com, time@xen.org, stefano.stabellini@citrix.com, Julien Grall , Keir Fraser , Jan Beulich , Mukesh Rathor Subject: [PATCH 1/8] DO NOT APPLY: xen/arm: Correctly support foreign page removing on ARM Date: Thu, 5 Dec 2013 15:42:04 +0000 Message-Id: <1386258131-755-2-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1386258131-755-1-git-send-email-julien.grall@linaro.org> References: <1386258131-755-1-git-send-email-julien.grall@linaro.org> 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.220.176 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: , This patch is here to fix "phv dom0: Add and remove foreign pages", I hope it will be merge to this patch in a later version. Signed-off-by: Julien Grall Cc: Keir Fraser Cc: Jan Beulich Cc: Mukesh Rathor --- xen/common/memory.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index ae11828..dfda092 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -708,19 +708,21 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg) { if ( page ) mfn = page_to_mfn(page); -#ifdef CONFIG_X86 else { - p2m_type_t tp; struct domain *foreign_dom; +#ifdef CONFIG_X86 + p2m_type_t tp; mfn = mfn_x(get_gfn_query(d, xrfp.gpfn, &tp)); - foreign_dom = page_get_owner(mfn_to_page(mfn)); ASSERT(is_pvh_domain(d)); - ASSERT(d != foreign_dom); ASSERT(p2m_is_foreign(tp)); - } +#else + mfn = gmfn_to_mfn(d, xrfp.gpfn); #endif + foreign_dom = page_get_owner(mfn_to_page(mfn)); + ASSERT(d != foreign_dom); + } guest_physmap_remove_page(d, xrfp.gpfn, mfn, 0); if (page) put_page(page);