[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AT5PR84MB0082AF4EDEB05999494CA62FABDA0@AT5PR84MB0082.NAMPRD84.PROD.OUTLOOK.COM>
Date: Wed, 21 Jun 2017 19:47:57 +0000
From: "Elliott, Robert (Persistent Memory)" <elliott@....com>
To: "Luck, Tony" <tony.luck@...el.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>
CC: Borislav Petkov <bp@...e.de>, Dave Hansen <dave.hansen@...el.com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
"'dan.j.williams@...el.com'" <dan.j.williams@...el.com>,
"Kani, Toshimitsu" <toshi.kani@....com>,
"Vaden, Tom (HPE Server OS Architecture)" <tom.vaden@....com>
Subject: RE: [PATCH] mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of
poison pages
> -----Original Message-----
> From: linux-kernel-owner@...r.kernel.org [mailto:linux-kernel-
> owner@...r.kernel.org] On Behalf Of Luck, Tony
> Sent: Wednesday, June 21, 2017 12:54 PM
> To: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> Cc: Borislav Petkov <bp@...e.de>; Dave Hansen <dave.hansen@...el.com>;
> x86@...nel.org; linux-mm@...ck.org; linux-kernel@...r.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
Powered by blists - more mailing lists