From patchwork Tue Aug 29 17:09:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Ostrovsky X-Patchwork-Id: 9927767 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 5E80860383 for ; Tue, 29 Aug 2017 17:10:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 87DA3289F3 for ; Tue, 29 Aug 2017 17:10:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52D20289C2; Tue, 29 Aug 2017 17:10:16 +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 D1E7F289CC for ; Tue, 29 Aug 2017 17:10:13 +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 1dmjyB-00053b-4O; Tue, 29 Aug 2017 17:06:31 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dmjyA-00052y-At for xen-devel@lists.xen.org; Tue, 29 Aug 2017 17:06:30 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id B5/E1-01783-51F95A95; Tue, 29 Aug 2017 17:06:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeJIrShJLcpLzFFi42KZM10+UFd0/tJ Ig3Vr2CyWfFzM4sDocXT3b6YAxijWzLyk/IoE1ozDS36wF/xhrWj8N5e1gfE3SxcjF4eQwEQm ie/LOxghnN+MEmtOf2aDcDYySnyZcJi5i5ETyOlhlDjZFg5iswkYSZw9Op0RxBYRkJa49vkyW DezQAOTxPNzB8ESwgJOEg2fzrGB2CwCqhL/eo6DxXkFvCT+Nh9gB7ElBBQkpjx8D7aAU8Bb4u 6s+4wQy7wk5ixvZoOoMZT4vHEp8wRGvgWMDKsY1YtTi8pSi3TN9JKKMtMzSnITM3N0DQ1M9XJ Ti4sT01NzEpOK9ZLzczcxAkOFAQh2ME5tcD7EKMnBpCTKWzV1aaQQX1J+SmVGYnFGfFFpTmrx IUYZDg4lCd6/c4FygkWp6akVaZk5wKCFSUtw8CiJ8J6fBZTmLS5IzC3OTIdInWLU5Wj6sOULk xBLXn5eqpQ470yQGQIgRRmleXAjYBF0iVFWSpiXEegoIZ6C1KLczBJU+VeM4hyMSsK8gvOApv Bk5pXAbXoFdAQT0BGxXmBHlCQipKQaGNPiG6/ef3HkyaGbVQueXJIQ4wvZKOpnnrH6Xn/T4Yz Ap3Evqt992hVWky+kncHwI8NAeKoBF+PzoOPz11yTmbs/guu6hlGpfvD8czLyoVPn7+BbdE7i 7u59FWt2vVvSwbr6Vv+NvOkHK5fULXlQUaAqLtLoFLT3ZtPvVwIbl37b5Cf9dXffpyAlluKMR EMt5qLiRADDZrmumwIAAA== X-Env-Sender: boris.ostrovsky@oracle.com X-Msg-Ref: server-15.tower-206.messagelabs.com!1504026386!95394062!1 X-Originating-IP: [156.151.31.81] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTU2LjE1MS4zMS44MSA9PiAyODgzMzk=\n X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 47851 invoked from network); 29 Aug 2017 17:06:28 -0000 Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by server-15.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 29 Aug 2017 17:06:28 -0000 Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v7TH6MZv011963 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Aug 2017 17:06:22 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v7TH6MuK002733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 29 Aug 2017 17:06:22 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v7TH6Lpq022577; Tue, 29 Aug 2017 17:06:21 GMT Received: from ovs104.us.oracle.com (/10.149.76.204) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 29 Aug 2017 10:06:21 -0700 From: Boris Ostrovsky To: xen-devel@lists.xen.org Date: Tue, 29 Aug 2017 13:09:15 -0400 Message-Id: <1504026557-11365-4-git-send-email-boris.ostrovsky@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1504026557-11365-1-git-send-email-boris.ostrovsky@oracle.com> References: <1504026557-11365-1-git-send-email-boris.ostrovsky@oracle.com> X-Source-IP: userv0022.oracle.com [156.151.31.74] 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 3/5] 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 --- Changes in v2: * s/boot_scrub_done/scrub_debug 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 a4a193b..3db77c5 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);