Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp61578ybb; Tue, 7 Apr 2020 16:54:43 -0700 (PDT) X-Google-Smtp-Source: APiQypKIqtTuh2U6h569Sb/7J+8Rh6HOuSfzZJ2z4q2bcVTAfbvGMzaKqspVNQ0qnNhcshas+EG3 X-Received: by 2002:a05:6830:1bc9:: with SMTP id v9mr3542734ota.169.1586303683221; Tue, 07 Apr 2020 16:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586303683; cv=none; d=google.com; s=arc-20160816; b=ZmIpZpBikGeE/3Qi8jCn7aN7DCICufhJlOw/YZUkVZERXaiupTQnMVHsQHrQPlOkHR ZIZTidM1qIBnA8gtOiHocdPBSrT77DiJ3vmpt46dkyRI3qsBJRxvRzpssbCctl8OT1V8 sGs2Rv5XVL/i0xDvsZThH+6KdssbxGYyWH9UniVOPIaF1/bHqLmbAwpgIT+iUgNOGTkF nUKxPx4QnAT/pL8zKb/UpUzaEM1nUEY2meTgiqeDlNT4/8fTzFQ/l3X63/KdztBzkHvL uJqdvZe9HPcp9utUnC7ehniR+esioejJ5s1/7fqUN46G1l3oQ/DyKwFEjFHOoLn2pwz2 nFUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=qvGTZxS/D1j01HRnunt+1JD5jgEe3ySvc88LKxPYhy8=; b=EJcnAuWcIbu2f+/krFuePrslCnE9CX9oVCT9KBYDFEIp5AuSmCnCQ4yEvWnmIS+1z0 OZFP+9/667dJjuiETBSKsjHxuYYLlfv7prmaVMlo9FnlA8jdLY/USE6adau7n4fyzguC nKAGOVVgbWn5N6cj2aOdo8C1IfIQsusCLmi/v13bcQTCB9I5iBFa1W35zD90TWqU2Z7h YlmsYagaa3HfFtuRHvZ41aFOf8EvVd3+SmU7hlNJEDCr9CqtUcISHiIWrj5/5lbbeAe3 FH/21Tfg8W7ORM1pwOH9C2E0qxkmTkuWx0FFKZOeSB4+/FgXvG0dm56iGz3u1VadKzqe 2U8Q== ARC-Authentication-Results: i=1; mx.google.com; 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 f12si1207610oig.263.2020.04.07.16.54.28; Tue, 07 Apr 2020 16:54:43 -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; 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 S1726586AbgDGXwh (ORCPT + 99 others); Tue, 7 Apr 2020 19:52:37 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:48689 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726428AbgDGXwh (ORCPT ); Tue, 7 Apr 2020 19:52:37 -0400 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jLy18-00079O-QP; Wed, 08 Apr 2020 01:52:30 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 5500F10069D; Wed, 8 Apr 2020 01:52:30 +0200 (CEST) From: Thomas Gleixner To: Balbir Singh , linux-kernel@vger.kernel.org Cc: jpoimboe@redhat.com, tony.luck@intel.com, keescook@chromium.org, benh@kernel.crashing.org, x86@kernel.org, dave.hansen@intel.com, Balbir Singh Subject: Re: [PATCH v2 3/4] arch/x86: Optionally flush L1D on context switch In-Reply-To: <20200406031946.11815-4-sblbir@amazon.com> References: <20200406031946.11815-1-sblbir@amazon.com> <20200406031946.11815-4-sblbir@amazon.com> Date: Wed, 08 Apr 2020 01:52:30 +0200 Message-ID: <87v9maj1kx.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Balbir, Balbir Singh writes: > diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h > index 6f66d841262d..69e6ea20679c 100644 > --- a/arch/x86/include/asm/tlbflush.h > +++ b/arch/x86/include/asm/tlbflush.h > @@ -172,7 +172,7 @@ struct tlb_state { > /* Last user mm for optimizing IBPB */ > union { > struct mm_struct *last_user_mm; > - unsigned long last_user_mm_ibpb; > + unsigned long last_user_mm_spec; > -static inline unsigned long mm_mangle_tif_spec_ib(struct task_struct *next) > +static inline unsigned long mm_mangle_tif_spec_bits(struct task_struct *next) > -static void cond_ibpb(struct task_struct *next) > +static void cond_mitigation(struct task_struct *next) > { > + unsigned long prev_mm, next_mm; > + > if (!next || !next->mm) > return; can you please split out these preparatory changes into a separate patch? Thanks, tglx