Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbcLMWqk (ORCPT ); Tue, 13 Dec 2016 17:46:40 -0500 Received: from terminus.zytor.com ([198.137.202.10]:49198 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750988AbcLMWqj (ORCPT ); Tue, 13 Dec 2016 17:46:39 -0500 Subject: Re: [RFC, PATCHv1 15/28] x86: detect 5-level paging support To: Borislav Petkov , Linus Torvalds References: <20161208162150.148763-1-kirill.shutemov@linux.intel.com> <20161208162150.148763-17-kirill.shutemov@linux.intel.com> <20161208200505.c6xiy56oufg6d24m@pd.tnic> <20161208202013.uutsny6avn5gimwq@pd.tnic> Cc: "Kirill A. Shutemov" , Andrew Morton , the arch/x86 maintainers , Thomas Gleixner , Ingo Molnar , Arnd Bergmann , Andi Kleen , Dave Hansen , Andy Lutomirski , "linux-arch@vger.kernel.org" , linux-mm , Linux Kernel Mailing List From: "H. Peter Anvin" Message-ID: Date: Tue, 13 Dec 2016 14:44:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161208202013.uutsny6avn5gimwq@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 616 Lines: 17 On 12/08/16 12:20, Borislav Petkov wrote: > On Thu, Dec 08, 2016 at 12:08:53PM -0800, Linus Torvalds wrote: >> Especially since that's some of the ugliest inline asm ever due to the >> nasty BX handling. > > Yeah, about that: why doesn't gcc handle that for us like it would > handle a clobbered register? I mean, it *should* know that BX is live > when building with -fPIC... The .ifnc thing looks really silly. > When compiling with -fPIC gcc treats ebx as a "fixed register". A fixed register can't be spilled, and so a clobber of a fixed register is a fatal error. Like it or not, it's how it works. -hpa