Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753008AbcLHUI5 (ORCPT ); Thu, 8 Dec 2016 15:08:57 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:36596 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312AbcLHUIz (ORCPT ); Thu, 8 Dec 2016 15:08:55 -0500 MIME-Version: 1.0 In-Reply-To: <20161208200505.c6xiy56oufg6d24m@pd.tnic> References: <20161208162150.148763-1-kirill.shutemov@linux.intel.com> <20161208162150.148763-17-kirill.shutemov@linux.intel.com> <20161208200505.c6xiy56oufg6d24m@pd.tnic> From: Linus Torvalds Date: Thu, 8 Dec 2016 12:08:53 -0800 X-Google-Sender-Auth: btqRqIEdk7NxkJb7k-0sZSShqmI Message-ID: Subject: Re: [RFC, PATCHv1 15/28] x86: detect 5-level paging support To: Borislav Petkov Cc: "Kirill A. Shutemov" , Andrew Morton , "the arch/x86 maintainers" , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "H. Peter Anvin" , Andi Kleen , Dave Hansen , Andy Lutomirski , "linux-arch@vger.kernel.org" , linux-mm , Linux Kernel Mailing List Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 548 Lines: 17 On Thu, Dec 8, 2016 at 12:05 PM, Borislav Petkov wrote: > > The cpuid() in cpuflags.c doesn't zero ecx which, if we have to be > pedantic, it should do. It calls CPUID now with the ptr value of its 4th > on 64-bit and 3rd arg on 32-bit, respectively, IINM. In fact, just do a single cpuid_count(), and then implement the traditional cpuid() as just #define cpuid(x, a,b,c,d) cpuid_count(x, 0, a, b, c, d) or something. Especially since that's some of the ugliest inline asm ever due to the nasty BX handling. Linus