Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751191AbdFUT7d convert rfc822-to-8bit (ORCPT ); Wed, 21 Jun 2017 15:59:33 -0400 Received: from g2t1383g.austin.hpe.com ([15.233.16.89]:49259 "EHLO g2t1383g.austin.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbdFUT7b (ORCPT ); Wed, 21 Jun 2017 15:59:31 -0400 From: "Elliott, Robert (Persistent Memory)" To: "Luck, Tony" , Borislav Petkov CC: Dave Hansen , Naoya Horiguchi , "x86@kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Yazen Ghannam , "'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: AQHS6SY7NIkyryuYLUCNcd9KLhmfHaIvmqcAgAAh4SA= Date: Wed, 21 Jun 2017 19:59:07 +0000 Message-ID: References: <20170616190200.6210-1-tony.luck@intel.com> <20170619180147.qolal6mz2wlrjbxk@pd.tnic> <20170621174740.npbtg2e4o65tyrss@intel.com> In-Reply-To: <20170621174740.npbtg2e4o65tyrss@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;AT5PR84MB0276;7:Orp3s8LDNqB903kTnUZpppj0G/xlW3oPTjYAldp3pfJmq/SGIh/OTNrc8P+eKLV43yAKD/f2B4HJWC9342gGz0usWgDSKAPv+Vf0A8qLlhR+MHpyRmm1qp/0jjhrd5rNvM54bmXRHC3h1FxWDGnbxzILhdmdCW+oNamEHhvqrLAHXWnY++wjCDdADrZyQPAKcZPy4tg/9Uoym8hplwPp1NCYUIDE2Ra+d5lPsEBhOlRwmLOxlHCbTHtHAGwL4v/HPtwpt4pjuiIDJFg+v8KjLn4QUUvIhGaza3EtbTufb7S56ccE8lsgdXcWteL080OSHw9JHSJGiQENGoqkIVxk/THi3hwBP5mRApgmvDgS9i5nZXgzo92NHBC4rAryxOBwAHMkOp4JtX+T+DLoZKtOjEjeO4xUgQ6jgB63m+K75z+Vo7u+2Nw7ecdyTnzvonKPtRFzmZ6pEKEqDmeAcP66n3EeOPz+FOA+X1KZh3Zm52l2EP6jdzOWbcGUa1qg5l+Lb/TZaH9fpYbpx9Jf54/w7FWKIbsp+8TivkepUaQ4dKGsfC5KE2/MSW76IShux8BHMFqgpgAotY5NBp1eACfpxAFqGiHinskgfkEA2/22L/45SinXjYq2+v/DORBFJS19L7TAXwakDRXynaCknrXSU+Znp6noq97lFzKLhqsRYMtz5QmSE4VKkeacMe7KTlBTOoupqHULv3+cNveDxmhw9xhOpsW7HNIEpc2gWDq4o1QIIXSRD8RbcsCZ1XjmbCAjRl7QQ1wWHw8hITjh14tEZA9mlo9GxW8r8pA2c2cQqC8= x-forefront-antispam-report: SFV:SKI;SCL:-1SFV:NSPM;SFS:(10019020)(6009001)(39410400002)(39400400002)(39850400002)(39860400002)(39450400003)(2950100002)(478600001)(189998001)(8666007)(2900100001)(66066001)(74316002)(6506006)(5660300001)(54356999)(81166006)(76176999)(50986999)(53936002)(8676002)(6436002)(7696004)(55016002)(33656002)(305945005)(54906002)(14454004)(102836003)(6116002)(4326008)(25786009)(38730400002)(9686003)(5250100002)(8936002)(2906002)(6246003)(86362001)(3846002)(3280700002)(3660700001)(7736002);DIR:OUT;SFP:1102;SCL:1;SRVR:AT5PR84MB0276;H:AT5PR84MB0082.NAMPRD84.PROD.OUTLOOK.COM;FPR:;SPF:None;MLV:sfv;LANG:en; x-ms-office365-filtering-correlation-id: 35910a41-7b65-46ee-c40b-08d4b8dffa5b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081)(201702281549075);SRVR:AT5PR84MB0276; x-ms-traffictypediagnostic: AT5PR84MB0276: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123564025)(20161123562025)(20161123560025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:AT5PR84MB0276;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:AT5PR84MB0276; 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:59:08.0775 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0276 X-OriginatorOrg: hpe.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 572 Lines: 20 > + decoy_addr = (pfn << PAGE_SHIFT) + (PAGE_OFFSET ^ BIT(63)); > +#else > +#error "no unused virtual bit available" > +#endif > + > + if (set_memory_np(decoy_addr, 1)) > + pr_warn("Could not invalidate pfn=0x%lx from 1:1 map \n", pfn); Does this patch handle breaking up 512 GiB, 1 GiB or 2 MiB page mappings if it's just trying to mark a 4 KiB page as bad? Although the kernel doesn't use MTRRs itself anymore, what if the system BIOS still uses them for some memory regions, and the bad address falls in an MTRR region? --- Robert Elliott, HPE Persistent Memory