Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753366AbbFIANu (ORCPT ); Mon, 8 Jun 2015 20:13:50 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:33738 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827AbbFIANn (ORCPT ); Mon, 8 Jun 2015 20:13:43 -0400 MIME-Version: 1.0 In-Reply-To: <1433752501-15901-3-git-send-email-mingo@kernel.org> References: <1433752501-15901-1-git-send-email-mingo@kernel.org> <1433752501-15901-3-git-send-email-mingo@kernel.org> From: Andy Lutomirski Date: Mon, 8 Jun 2015 17:13:21 -0700 Message-ID: Subject: Re: [PATCH 2/4] x86/asm/entry: Untangle 'ia32_sysenter_target' into two entry points: entry_SYSENTER_32 and entry_SYSENTER_compat To: Ingo Molnar Cc: "linux-kernel@vger.kernel.org" , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner 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: 1529 Lines: 36 On Mon, Jun 8, 2015 at 1:34 AM, Ingo Molnar wrote: > So the SYSENTER instruction is pretty quirky and it has different behavior > depending on bitness and CPU maker. > > Yet we create a false sense of coherency by naming it 'ia32_sysenter_target' > in both of the cases. > > Split the name into its two uses: > > ia32_sysenter_target (32) -> entry_SYSENTER_32 > ia32_sysenter_target (64) -> entry_SYSENTER_compat > Now that I'm rebasing my pile on top of this, I have a minor gripe about this one. There are (in my mind, anyway), two SYSENTER instructions: the 32-bit one and the 64-bit one. (That is, there's SYSENTER32, which happens when you do SYSENTER in 32-bit or compat mode, and SYSENTER64, which happens when you do SYSENTER in long mode.) SYSENTER32, from user code's perspective, does the same thing in either case [1]. That means that it really does make sense that we'd have two implementations of the same entry point, one written in 32-bit asm and one written in 64-bit asm. The patch I'm rebasing merges the two wrmsrs to MSR_IA32_SYSENTER, and this change makes it uglier. [1] Sort of. We probably have differently nonsensical calling conventions, but that's our fault and has nothing to do with the hardware. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/