Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp558044ybz; Fri, 17 Apr 2020 06:09:42 -0700 (PDT) X-Google-Smtp-Source: APiQypKze6ft5aSmEbA5l7yTpWgc84532zGF1cTAx8Dv3Pw/Uv/qywZXT4gVB36ERSvgenk/1EbJ X-Received: by 2002:a17:906:64b:: with SMTP id t11mr2932611ejb.336.1587128981873; Fri, 17 Apr 2020 06:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587128981; cv=none; d=google.com; s=arc-20160816; b=s82nWlaaxgLrhkgPTfTHVTV7f3im2GVDbl0taNaErXhXm6b+mfCiruMNr4g76azb2J sOqsFxsOy28mnw1P5SlS7pG3uabZ13tgzSAAl68/kHq2/iSmeodwppIZ1gvec029uMM/ Q2SfedkEpseWcczFqC8LTf1+s1yuAlv5+td68cGbUtLoJ8aQRSd+n/B2GEjuCr/Vo3Da 4I+VyZPa9CuJFxNyAYI/OHyJYaFC/3XJXz2ZOHUqZC9AXosv3C8uAcSawGCl3TK9hKmC yyoG9YAmCyjNGNhwnxOLVIJ+qurKWvVGn4RkoQXXJl/3tRj72Drv64TbkvICodBWsQgT AYrw== 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=SWCAnpZgzCM67KihbiF/T9JC1H8ZNSB+oaMFViXQ8Co=; b=haRnrxGYgFMXIJsDYvSSr++DmLyMv6iy0KVlu8DTQyBlp9KC0ArIRp2ZnfNFpF56Tg LlMkZfd5u/ADlDI9CDHcARhwbo3J8QRU3qzm/fY1PHsxFxca03BeDSteiFddVCjnoHyn qyxFNWPnW/Do2t8xonbqdFpVfSclEg4UFpD0hO7s5OdmxEegxNFTF5hw0wa32V5wHZlG k/IutZq2MX+S9G8KQ7mGc729J0aRAra02d954GvLBuUnwZvrX/pKZNaSaVrPflZW4X/J kUF0osGZMhT1P8b75sopx/7ad7ssdvRBxOxOdJFvcHwJOZ9vtLsg8eSuumR9oOvIvF1H Bdng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si13792656eds.587.2020.04.17.06.09.13; Fri, 17 Apr 2020 06:09:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729959AbgDQNHk (ORCPT + 99 others); Fri, 17 Apr 2020 09:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729799AbgDQNHk (ORCPT ); Fri, 17 Apr 2020 09:07:40 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29820C061A0C for ; Fri, 17 Apr 2020 06:07:40 -0700 (PDT) Received: from [5.158.153.52] (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 1jPQiS-00006l-6S; Fri, 17 Apr 2020 15:07:32 +0200 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id D37BE104096; Fri, 17 Apr 2020 15:07:31 +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 v3 3/5] arch/x86/mm: Refactor cond_ibpb() to support other use cases In-Reply-To: <20200408090229.16467-4-sblbir@amazon.com> References: <20200408090229.16467-1-sblbir@amazon.com> <20200408090229.16467-4-sblbir@amazon.com> Date: Fri, 17 Apr 2020 15:07:31 +0200 Message-ID: <87sgh2l0q4.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Balbir Singh writes: > > /* > - * Use bit 0 to mangle the TIF_SPEC_IB state into the mm pointer which is > - * stored in cpu_tlb_state.last_user_mm_ibpb. > + * Bits to mangle the TIF_SPEC_IB state into the mm pointer which is > + * stored in cpu_tlb_state.last_user_mm_spec. > */ > #define LAST_USER_MM_IBPB 0x1UL > +#define LAST_USER_MM_SPEC_MASK (LAST_USER_MM_IBPB) > > /* Reinitialize tlbstate. */ > - this_cpu_write(cpu_tlbstate.last_user_mm_ibpb, LAST_USER_MM_IBPB); > + this_cpu_write(cpu_tlbstate.last_user_mm_spec, LAST_USER_MM_IBPB); Shouldn't that be LAST_USER_MM_MASK? Thanks, tglx