From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754285AbcGFQDJ (ORCPT ); Wed, 6 Jul 2016 12:03:09 -0400 Received: from www.sr71.net ([198.145.64.142]:53136 "EHLO blackbird.sr71.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753818AbcGFQDG (ORCPT ); Wed, 6 Jul 2016 12:03:06 -0400 Subject: Re: [PATCH 3/4] x86: disallow running with 32-bit PTEs to work around erratum To: Hillf Danton , Dave Hansen References: <006001d1d5a8$dd26e1f0$9774a5d0$@alibaba-inc.com> <006401d1d5ab$5e154070$1a3fc150$@alibaba-inc.com> Cc: linux-kernel , linux-mm@kvack.org From: Dave Hansen Message-ID: <577D2B91.2030007@sr71.net> Date: Wed, 6 Jul 2016 09:02:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <006401d1d5ab$5e154070$1a3fc150$@alibaba-inc.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/03/2016 09:20 PM, Hillf Danton wrote: ... >> When we have 64-bit PTEs (64-bit mode or 32-bit PAE), we were able >> to move the swap PTE format around to avoid these troublesome bits. >> But, 32-bit non-PAE is tight on bits. So, disallow it from running >> on this hardware. I can't imagine anyone wanting to run 32-bit >> on this hardware, but this is the safe thing to do. > > > > Isn't this work from Mr. Tlb? I have no idea what you mean. >> + if (!err) >> + err = check_knl_erratum(); >> >> if (err_flags_ptr) >> *err_flags_ptr = err ? err_flags : NULL; >> @@ -185,3 +188,32 @@ int check_cpu(int *cpu_level_ptr, int *r >> >> return (cpu.level < req_level || err) ? -1 : 0; >> } >> + >> +int check_knl_erratum(void) > > s/knl/xeon_knl/ ? Nah. I mean we could say xeon_phi_knl, but I don't think it's worth worrying too much about a function called in one place and commented heavily. >> + puts("This 32-bit kernel can not run on this processor due\n" >> + "to a processor erratum. Use a 64-bit kernel, or PAE.\n\n"); > > Give processor name to the scared readers please. Yeah, that's a pretty good idea. I'll be more explicit.