From patchwork Thu Aug 31 13:16:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9932185 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED217603B4 for ; Thu, 31 Aug 2017 13:16:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E05AD28869 for ; Thu, 31 Aug 2017 13:16:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D530128896; Thu, 31 Aug 2017 13:16:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4657628869 for ; Thu, 31 Aug 2017 13:16:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnPHn-000509-1S; Thu, 31 Aug 2017 13:13:31 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dnPHm-0004zu-2R for xen-devel@lists.xen.org; Thu, 31 Aug 2017 13:13:30 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id BE/4D-02229-97B08A95; Thu, 31 Aug 2017 13:13:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeJIrShJLcpLzFFi42LpnVTnqlvBvSL SYN1VbYslHxezODB6HN39mymAMYo1My8pvyKBNWP/ziuMBWdYK1Y86WZuYLzI0sXIxSEkMJlJ YvukxawQzl9GiRV9O4EcTiBnI6NEy30viEQPo8SsI8fAEmwCRhJnj05nBLFFBKQlrn2+zAhSx CzQwCTx/NxBsISwgKvEmwcrmUFsFgFVid7194BsDg5eAU+JBe+VQMISAgoSUx6+ByvhFPCSWH v3MtRiT4kja5cyQdQYS/TN6mOZwMi3gJFhFaN6cWpRWWqRrpFeUlFmekZJbmJmjq6hgbFebmp xcWJ6ak5iUrFecn7uJkZgoNQzMDDuYDzV7HyIUZKDSUmU9+Ht5ZFCfEn5KZUZicUZ8UWlOanF hxhlODiUJHhFuFZECgkWpaanVqRl5gBDFiYtwcGjJMJbCJLmLS5IzC3OTIdInWLU5Wj6sOULk xBLXn5eqpQ47wNOoCIBkKKM0jy4EbD4ucQoKyXMy8jAwCDEU5BalJtZgir/ilGcg1FJmLcCZB VPZl4J3KZXQEcwAR0R67UU5IiSRISUVANjgugG22XPwsXVX+95tDapfuqd9Ywa/z//YFnvm37 iRyOXlRXL6o/Wm15E/9CzYN+/bLKli13+0U9dUUWH7t0VvNAoHnX+1+zrJ8Nuhhe1GP0Qriif ycxw3WXd+j8i12PSTPzkWNdm7dw/efbm90abHM8/ubvzTfyV6XK2cYefHH4TNGFNWWnZTyWW4 oxEQy3mouJEAGPEs8WaAgAA X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1504185206!95707342!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 2168 invoked from network); 31 Aug 2017 13:13:28 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-12.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 31 Aug 2017 13:13:28 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v7VDDMPa017143 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Aug 2017 13:13:22 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v7VDDMYB014323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Aug 2017 13:13:22 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v7VDDM4q022078; Thu, 31 Aug 2017 13:13:22 GMT Received: from ovs104.us.oracle.com (/10.149.76.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 31 Aug 2017 06:13:21 -0700 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Thu, 31 Aug 2017 09:16:13 -0400 Message-Id: <1504185374-7581-4-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1504185374-7581-1-git-send-email-boris.ostrovsky@oracle.com> References: <1504185374-7581-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Cc: sstabellini@kernel.org, wei.liu2@citrix.com, George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com, Boris Ostrovsky Subject: [Xen-devel] [PATCH v2 3/4] mm: Don't poison a page if scrub_debug is off X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP If scrub_debug is off we don't check pages in check_one_page(). Thus there is no reason to ever poison them. Signed-off-by: Boris Ostrovsky Reviewed-by: Wei Liu --- xen/common/page_alloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 2c7675b..2b8bb95 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -714,6 +714,9 @@ static void poison_one_page(struct page_info *pg) mfn_t mfn = _mfn(page_to_mfn(pg)); uint64_t *ptr; + if ( !scrub_debug ) + return; + ptr = map_domain_page(mfn); *ptr = ~SCRUB_PATTERN; unmap_domain_page(ptr);