Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751922AbdFUTsG convert rfc822-to-8bit (ORCPT ); Wed, 21 Jun 2017 15:48:06 -0400 Received: from g9t1613g.houston.hpe.com ([15.241.32.99]:13297 "EHLO g9t1613g.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbdFUTsF (ORCPT ); Wed, 21 Jun 2017 15:48:05 -0400 From: "Elliott, Robert (Persistent Memory)" To: "Luck, Tony" , Naoya Horiguchi CC: Borislav Petkov , Dave Hansen , "x86@kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "'dan.j.williams@intel.com'" , "Kani, Toshimitsu" , "Vaden, Tom (HPE Server OS Architecture)" Subject: RE: [PATCH] mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages Thread-Topic: [PATCH] mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages Thread-Index: AQHS5tyANIkyryuYLUCNcd9KLhmfHaIuAw4AgAGd9YCAAB4PwA== Date: Wed, 21 Jun 2017 19:47:57 +0000 Message-ID: References: <20170616190200.6210-1-tony.luck@intel.com> <20170621021226.GA18024@hori1.linux.bs1.fc.nec.co.jp> <20170621175403.n5kssz32e2oizl7k@intel.com> In-Reply-To: <20170621175403.n5kssz32e2oizl7k@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=hpe.com; x-originating-ip: [15.203.227.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AT5PR84MB0275;7:zxp2XXK/6RRXZdMU/szD1IADRoS6ZFCfwJt37rSsGGbCLh5T3ypHtnB/hMDY5eqYF4F5vIabyuRwhAyZI4lWbc7fexhJkmKjb7JurOY3+N1L+Z8ZCYumn4YcMz62wuv2blgDfmKK7PiXG9yobzjMlxFJupOTLwvHpki51qWZIeOdTUe5nFQilxI6RyU9ztPfbgqjP9sPDm+CDAMiU5WGLd+Uqy7uNuaLYiwfZHmZ+wwnFJ1rWRYcDI91sjelumt3VW5tQfBBLBqh6j+YzFjMIxy+Cnj0HxnKwQlITMGk88NEdsDA8Qi6xwTtxkr8ED0DV22yAZDO8Gh1WONbiQem6tIFnecafTAF8CqoGEKdiecPyOtxTIqI/rN4DBE5BVsIAmjjnAK8GJmFst/G3pXfenCJMD9HZaAv4OLCNcNIyxIblv67Zt04n7KC9+/3uO4eaeQVDuZLdG3tGCq9E5lOO58kT/eChAInwHe1rRMvSNcLYtSp1NNzFc9Qg8Jzsi6Ct0mYz1ULgTBh2GhDlRLC/n4/Xy4//XLmCN9uvFgfUQA782CoLa3IuPVxjxgRvZ4SnR/tqcb/KwvbQb/O9gXIB9QmLr5+oXXmOOL1BSUNm+qXjvPBazcZEmPMJPN2g74ZFjcbJ4y3gqXrQvgKfGkurJe/IlFog9gXQ+wmklqDxT1OhdXk0dMMu8jCPl9we/dP5LbrGF8IXQGHDGKmvEfKl175nLCSmz3OsEDzwFqwJsyq+GgTDgABP2Dqwz6IqGy583ZQ6x59XxhazaXdD6LI0UWRAMXeeYu8wof+4IGD1Y8= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10019020)(6009001)(39400400002)(39850400002)(39410400002)(39860400002)(39450400003)(13464003)(377454003)(24454002)(81166006)(25786009)(3280700002)(86362001)(33656002)(5250100002)(38730400002)(66066001)(14454004)(8676002)(102836003)(3846002)(4326008)(2906002)(6116002)(3660700001)(7736002)(189998001)(55016002)(2900100001)(9686003)(7696004)(478600001)(50986999)(54356999)(76176999)(54906002)(6436002)(6246003)(6506006)(2950100002)(305945005)(74316002)(53936002)(5660300001)(8936002)(53546010);DIR:OUT;SFP:1102;SCL:1;SRVR:AT5PR84MB0275;H:AT5PR84MB0082.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: 7afd1029-d343-4aae-589f-08d4b8de6ab9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:AT5PR84MB0275; x-ms-traffictypediagnostic: AT5PR84MB0275: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AT5PR84MB0275;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AT5PR84MB0275; x-forefront-prvs: 0345CFD558 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Jun 2017 19:47:57.6461 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0275 X-OriginatorOrg: hpe.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 39 > -----Original Message----- > From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- > owner@vger.kernel.org] On Behalf Of Luck, Tony > Sent: Wednesday, June 21, 2017 12:54 PM > To: Naoya Horiguchi > Cc: Borislav Petkov ; Dave Hansen ; > x86@kernel.org; linux-mm@kvack.org; linux-kernel@vger.kernel.org (adding linux-nvdimm list in this reply) > Subject: Re: [PATCH] mm/hwpoison: Clear PRESENT bit for kernel 1:1 > mappings of poison pages > > On Wed, Jun 21, 2017 at 02:12:27AM +0000, Naoya Horiguchi wrote: > > > We had better have a reverse operation of this to cancel the unmapping > > when unpoisoning? > > When we have unpoisoning, we can add something. We don't seem to have > an inverse function for "set_memory_np" to just flip the _PRESENT bit > back on again. But it would be trivial to write a set_memory_pp(). > > Since we'd be doing this after the poison has been cleared, we wouldn't > need to play games with the address. We'd just use: > > set_memory_pp((unsigned long)pfn_to_kaddr(pfn), 1); > > -Tony Persistent memory does have unpoisoning and would require this inverse operation - see drivers/nvdimm/pmem.c pmem_clear_poison() and core.c nvdimm_clear_poison(). --- Robert Elliott, HPE Persistent Memory