From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f197.google.com (mail-pf0-f197.google.com [209.85.192.197]) by kanga.kvack.org (Postfix) with ESMTP id A00B06B0430 for ; Wed, 21 Jun 2017 13:54:04 -0400 (EDT) Received: by mail-pf0-f197.google.com with SMTP id p4so165233099pfk.15 for ; Wed, 21 Jun 2017 10:54:04 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTPS id g34si14540163pld.495.2017.06.21.10.54.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jun 2017 10:54:04 -0700 (PDT) Date: Wed, 21 Jun 2017 10:54:03 -0700 From: "Luck, Tony" 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> Sender: owner-linux-mm@kvack.org List-ID: To: Naoya Horiguchi Cc: Borislav Petkov , Dave Hansen , "x86@kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org