Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp238611ybj; Fri, 8 May 2020 10:35:24 -0700 (PDT) X-Google-Smtp-Source: APiQypIsHAwPwjR/8WXgoScJgREnr6Ndt+zrbn8FIcJaqt7uF0Vqrz+frT/iDkc2ZF2jJH5B+Fnf X-Received: by 2002:aa7:c643:: with SMTP id z3mr3093927edr.154.1588959324311; Fri, 08 May 2020 10:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588959324; cv=none; d=google.com; s=arc-20160816; b=IJwUCkXrqJB3gtqB6+MJPin7SfugWByjGDwQE9dCKX2nlvdAVG9qyOwMV7Oc0L/EFN K6IYHnkCZFqBne4UNY1G2bwSMyEblGaT1mj7kDmfLdZcJKY9di9vdaTm7g8JpCH3qfdn sNmYVd4Wf4nE+MH/wdjsGzAYrm721DHEruUc7vdi5QmH/6uHYQ57oxErlG+ZWs71bnXL alqm8ZNRArC5Qa80HqwkI+sUa2t65WeqU7Ld7XCGycR3mkczy+zHhFwHgNmeQcLy0CYY ulw6HiJimkU/+DmlFo/6dX99ecH0HDw0LgdY+XTk2MdV9Kodlwy6AHNS9QXcXCF6BRll 2H1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature:dkim-filter; bh=h7A5cg0DMlgygdlKSmaWPgKUTraZaMgxwhuDEQt441A=; b=ngUuWS8xle3JnwW01iF7KkZjls/mUFOGdDGtdfdn7XXbtaiaUemIN8l1qRaSA32KwT ssHuPrV/BM2lIAroPuQSJ4zZkUjqhTTQI0TmKul4YFIHY+9YmqTVgFhUSbJvRIHULJML +CxCLCQykS/99ke9sGjbf3feevazU8Vm8IWlP8FwBFbxwb0v2unX4KsT1K1zO7Z2Ub7Q nYex7UDvDVr+Ij5Y5b1uUE840vi7//J86+7MaJlABMUtJbELK6AzfBKOZjl3nGc+JnL7 NX745SywB//U88Gfw7I8YSrGrakQAkwI3irgYpjuFPUCC346FAjluqftY380G4i9Njsk qDpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2020042201 header.b=kLPsQu+D; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si1281749eds.369.2020.05.08.10.35.01; Fri, 08 May 2020 10:35:24 -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; dkim=pass header.i=@zytor.com header.s=2020042201 header.b=kLPsQu+D; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727934AbgEHRc4 (ORCPT + 99 others); Fri, 8 May 2020 13:32:56 -0400 Received: from terminus.zytor.com ([198.137.202.136]:60601 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727111AbgEHRcy (ORCPT ); Fri, 8 May 2020 13:32:54 -0400 Received: from carbon-x1.hos.anvin.org ([IPv6:2601:646:8600:3281:e7ea:4585:74bd:2ff0]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id 048HWjZ53922207 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Fri, 8 May 2020 10:32:46 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 048HWjZ53922207 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2020042201; t=1588959166; bh=h7A5cg0DMlgygdlKSmaWPgKUTraZaMgxwhuDEQt441A=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=kLPsQu+Duq12mPPzuMs4vVQvm98FOW4+eK2So3t5EdbQALVaGKvfThPUG8hReyI93 cfRUohHny9yUmOT+ZAvKFnsGnuUygbVEvUeWTZbE3+G36vBEePb/nB9qZmiawjCfQH c1ttYxmSE3mSDyuU+sBSfpYR/2NV2Lv4B1YIT+meF9p+apudxF6bEPq1IZ7ew2wzWN oBoImUmOGNJBe19+nPRZzvbEpDLiAaMed/rlr2QYh0Pj6+jDRp8iOI6C3FteW+AVrR tGOJrbJ/JWgTw1VYMqTj5Wq5Bm+HLP80m2ynIl9WBJQq/ZiX/Br7Ojo5B/4F5NsDJ6 hzvdXZ6FbIxIQ== Subject: Re: [PATCH] x86: Use INVPCID mnemonic in invpcid.h To: Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Ingo Molnar , Thomas Gleixner References: <20200508092247.132147-1-ubizjak@gmail.com> From: "H. Peter Anvin" Message-ID: <8f88a2e9-fe01-3bb8-bc84-17f1b7e2dfeb@zytor.com> Date: Fri, 8 May 2020 10:32:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200508092247.132147-1-ubizjak@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: H. Peter Anvin (Intel) On 2020-05-08 02:22, Uros Bizjak wrote: > Current minimum required version of binutils is 2.23, > which supports INVPCID instruction mnemonic. > > Replace the byte-wise specification of INVPCID with > this proper mnemonic. > > Signed-off-by: Uros Bizjak > CC: "H. Peter Anvin" > CC: Ingo Molnar > CC: Thomas Gleixner > --- > arch/x86/include/asm/invpcid.h | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/include/asm/invpcid.h b/arch/x86/include/asm/invpcid.h > index 989cfa86de85..23749bbca0ad 100644 > --- a/arch/x86/include/asm/invpcid.h > +++ b/arch/x86/include/asm/invpcid.h > @@ -12,12 +12,9 @@ static inline void __invpcid(unsigned long pcid, unsigned long addr, > * stale TLB entries and, especially if we're flushing global > * mappings, we don't want the compiler to reorder any subsequent > * memory accesses before the TLB flush. > - * > - * The hex opcode is invpcid (%ecx), %eax in 32-bit mode and > - * invpcid (%rcx), %rax in long mode. > */ > - asm volatile (".byte 0x66, 0x0f, 0x38, 0x82, 0x01" > - : : "m" (desc), "a" (type), "c" (&desc) : "memory"); > + asm volatile ("invpcid %1, %0" > + : : "r" (type), "m" (desc) : "memory"); > } > > #define INVPCID_TYPE_INDIV_ADDR 0 >