From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f71.google.com (mail-pl0-f71.google.com [209.85.160.71]) by kanga.kvack.org (Postfix) with ESMTP id DDB286B0005 for ; Wed, 18 Apr 2018 19:26:21 -0400 (EDT) Received: by mail-pl0-f71.google.com with SMTP id y7-v6so1846717plh.7 for ; Wed, 18 Apr 2018 16:26:21 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com. [134.134.136.100]) by mx.google.com with ESMTPS id g76si2092866pfa.337.2018.04.18.16.26.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 16:26:20 -0700 (PDT) From: Andi Kleen Subject: Re: [PATCH 03/35] x86/entry/32: Load task stack from x86_tss.sp1 in SYSENTER handler References: <1523892323-14741-1-git-send-email-joro@8bytes.org> <1523892323-14741-4-git-send-email-joro@8bytes.org> Date: Wed, 18 Apr 2018 16:26:19 -0700 In-Reply-To: <1523892323-14741-4-git-send-email-joro@8bytes.org> (Joerg Roedel's message of "Mon, 16 Apr 2018 17:24:51 +0200") Message-ID: <87k1t4t7tw.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Joerg Roedel Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waim@linux.intel.com Joerg Roedel writes: > From: Joerg Roedel > > We want x86_tss.sp0 point to the entry stack later to use > it as a trampoline stack for other kernel entry points > besides SYSENTER. > > So store the task stack pointer in x86_tss.sp1, which is > otherwise unused by the hardware, as Linux doesn't make use > of Ring 1. Seems like a hack. Why can't that be stored in a per cpu variable? -Andi