Received: by 10.223.164.221 with SMTP id h29csp1948595wrb; Thu, 2 Nov 2017 03:35:03 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QOwE8/hmcBLSQ7+lET+d/96LOEcDJ3pkCN1NxagLmG9Xmm44fCeCW7zXORqjopjAwg9wyS X-Received: by 10.98.245.152 with SMTP id b24mr3323939pfm.56.1509618903516; Thu, 02 Nov 2017 03:35:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509618903; cv=none; d=google.com; s=arc-20160816; b=K0/pJLTvkyvQaGIbeCGWaQHVn+Eg2H5FnQBNRcxT/MHmzFS542kqToNRQg2hIiH1zW dgPj4t6d2rqdF6oO8R9l4GEDCGNVdm728jXTlndTSxv9+4QHF6FoqJvQsUmczZBVD+GP g1p6aWSoNEgRGBQpo7P6o1Oo/khcTxs8IR7JDQkRHaNAkoasMWYg7w2ue1PjtQudPM29 k5VZG/QdBDON5QU3Pi1LiTtoKtDRoUDSxGpDxnimBQ9Y4s2rOvff5OOOG4kdBebcuoht 4aZ+4DCzjF7PVAiwjYeywG+DtwxL3/zJ9DbXp87Umy3nl3mvfSNCty3Lz15vkdibFjI8 XQhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=IKMsGrnwJrwhTRA5F0X+AP9Rix/2hMIR4HUj/gTRCe4=; b=kJsUFzdKgQ186jl4UoAhMmOtDAqdrzaLOOsQmwtzF9rZqyiT6s2yElUFFeBkhaYNpf bOnAh2MbmFwR0vX2xOsl3dljL/NCmYytv+RjRNzYpG0R/96Kd/aqzaDqr/Gao8221ANK wwzffAHYC24wk+uzHg1HQES+S4Xd/jsqb4rSQ2inZgdgPD0uC2MBMdPOdmtysZmdJTwY cy5HHT+CuzrR2hRhRgjvV5ozKJisyupfB/0I9mQ4R/q3OO9IVrwqi9C9i/LLzQNsiB4w 6dqwlFFDuEQ7UNSrHpH7EBVxG4pG8bXiqAcLSEjePe6IHTa5CcaL56ZN7X1lpoBqRmfe Rn7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=1LvBlAuD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k7si3102734pgr.403.2017.11.02.03.34.49; Thu, 02 Nov 2017 03:35:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=1LvBlAuD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755505AbdKBKeK (ORCPT + 99 others); Thu, 2 Nov 2017 06:34:10 -0400 Received: from mail-vk0-f68.google.com ([209.85.213.68]:50147 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752632AbdKBKeJ (ORCPT ); Thu, 2 Nov 2017 06:34:09 -0400 Received: by mail-vk0-f68.google.com with SMTP id t184so3269484vka.6 for ; Thu, 02 Nov 2017 03:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IKMsGrnwJrwhTRA5F0X+AP9Rix/2hMIR4HUj/gTRCe4=; b=1LvBlAuDqXGRMIN0UplHKTVRGHA87L7/H5rkKT9+zRiB+nB4LwYUok20RKdzy/1RKW OOArAQ+upf9SLxYw0m8G2JXM2pAoYizPU9362QZAwiwr8MwPKE+VLcwII2C0ijkCGaHn NuZnBAIAGDF/nFwSgansPu1nePj1G0mzaaOKLat+WefcutIzE5pqioYHcrof+j9kjduv L+HhbvvEcYQtmNaP+ip6g7hqVjkjT1sN/DI1SU1t4DM0WJrQPU1KOQdKEtE68eTv66hj kVPimWHQkHHMDx3ItsV7Rdg9DFUk09K6BbTpGWgifli6R6FdYP66Nnt0IB61gYO+zQDQ Fl8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=IKMsGrnwJrwhTRA5F0X+AP9Rix/2hMIR4HUj/gTRCe4=; b=HcELBNhT7Nw1J84kGQmrBwOb3NAcKb1I950i3AM9BdHCdJ/3uL7YcgCcUutQRyBLMY o+f1OKsQFnDQhByso3t+7lB7fIJb23K+mbkBAdoyNEuAItLJdhuYueO4C239f1uxRk9N Bo8jQE0MBppfWPKmKePluK2aQ2tzSl7JlpKN6qKxTLhmNPvU/NFquQyv6zwOXiza1G8W 71KxfQfUD8pXJfRbHyYpaoxP/JR2TJwVu27UqxVQwevZiTw5MPLHzQVULm70Vx4cb9j0 YsJ5lH0Ed1aTD4zYGp0BdFCOpOPOmiBvqr+YJZZac1utsMLGLzDzX1LIV15rmVT+bP6p VOuA== X-Gm-Message-State: AJaThX64ihtBUHCojb1pNmQSWH4f+T6osr2wuNXqO//L7uJNN7rJtH4Q Ifs2IGZIu1JnLrBYONA82MS28US8IhE= X-Received: by 10.31.86.199 with SMTP id k190mr2175200vkb.83.1509618848450; Thu, 02 Nov 2017 03:34:08 -0700 (PDT) Received: from [26.66.54.52] ([172.56.12.194]) by smtp.gmail.com with ESMTPSA id m6sm484156vkb.13.2017.11.02.03.34.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Nov 2017 03:34:07 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v2 13/20] x86/asm/64: Pass sp0 directly to load_sp0() From: Andy Lutomirski X-Mailer: iPhone Mail (15A432) In-Reply-To: <20171102094813.idw77gu2rarcu4zq@gmail.com> Date: Thu, 2 Nov 2017 11:32:38 +0100 Cc: Andy Lutomirski , X86 ML , Borislav Petkov , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds Content-Transfer-Encoding: quoted-printable Message-Id: <429FD204-476B-4F5B-B007-A444F6562E79@amacapital.net> References: <2655d8b42ed940aa384fe18ee1129bbbcf730a08.1509609304.git.luto@kernel.org> <20171102094813.idw77gu2rarcu4zq@gmail.com> To: Ingo Molnar Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Nov 2, 2017, at 10:48 AM, Ingo Molnar wrote: >=20 >=20 > * Andy Lutomirski wrote: >=20 >> load_sp0() had an odd signature: >>=20 >> void load_sp0(struct tss_struct *tss, struct thread_struct *thread); >>=20 >> Simplify it to: >>=20 >> void load_sp0(unsigned long sp0); >=20 > I also added this to the changelog: >=20 >> Also simplify a few get_cpu()/put_cpu() sequences to >> preempt_disable()/preempt_enable(). >=20 > Plus: >=20 >> --- a/arch/x86/kernel/cpu/common.c >> +++ b/arch/x86/kernel/cpu/common.c >> @@ -1572,7 +1572,7 @@ void cpu_init(void) >> initialize_tlbstate_and_flush(); >> enter_lazy_tlb(&init_mm, me); >>=20 >> - load_sp0(t, ¤t->thread); >> + load_sp0(current->thread.sp0); >> set_tss_desc(cpu, t); >> load_TR_desc(); >> load_mm_ldt(&init_mm); >> @@ -1627,7 +1627,7 @@ void cpu_init(void) >> initialize_tlbstate_and_flush(); >> enter_lazy_tlb(&init_mm, curr); >>=20 >> - load_sp0(t, thread); >> + load_sp0(thread->sp0); >> set_tss_desc(cpu, t); >> load_TR_desc(); >> load_mm_ldt(&init_mm); >=20 > In the 32-bit path this was the last use of 'thread', making the local var= iable=20 > unused - I removed it. >=20 > Just curious: did you build/boot-test 32-bit kernels, or should we conside= r it=20 > mostly untested? I tested it in an earlier version, but I'm away from my real computer, so I h= aven't tested as well as I should. It should be run through at least the se= lftests on 32-bit, 64-bit, and Xen PV. >=20 > Thanks, >=20 > Ingo From 1582947599188798930@xxx Thu Nov 02 09:54:29 +0000 2017 X-GM-THRID: 1582940507843427928 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread