Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752701AbdFURyK (ORCPT ); Wed, 21 Jun 2017 13:54:10 -0400 Received: from mga04.intel.com ([192.55.52.120]:56076 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751114AbdFURyJ (ORCPT ); Wed, 21 Jun 2017 13:54:09 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,369,1493708400"; d="scan'208";a="117186399" Date: Wed, 21 Jun 2017 10:54:03 -0700 From: "Luck, Tony" To: Naoya Horiguchi Cc: Borislav Petkov , Dave Hansen , "x86@kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mm/hwpoison: Clear PRESENT bit for kernel 1:1 mappings of poison pages Message-ID: <20170621175403.n5kssz32e2oizl7k@intel.com> References: <20170616190200.6210-1-tony.luck@intel.com> <20170621021226.GA18024@hori1.linux.bs1.fc.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170621021226.GA18024@hori1.linux.bs1.fc.nec.co.jp> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 555 Lines: 15 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