From patchwork Thu Jan 12 12:16:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 42397 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3848202wrt; Thu, 12 Jan 2023 04:17:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXtIc+U8mMhQD0T8Qs41+xVe667PVpqvKtus+BUX0MdiuON2TkKcBQIKTZJyT4i0TBFNWPbL X-Received: by 2002:a05:6a20:94c3:b0:a3:6f97:e658 with SMTP id ht3-20020a056a2094c300b000a36f97e658mr93073600pzb.58.1673525872519; Thu, 12 Jan 2023 04:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673525872; cv=none; d=google.com; s=arc-20160816; b=A/tbgp9UMR40u4Jqvw2aTXxyfWzA2MDWtCaPl/zcZVM+cL5qEdR515vqcPUxITRRrk shVVb6tyFfbNQgeLrPQ9njL3sSew2e88jRV8PyPaJFdKi3UtJS23CZx7tO70zFQjU0I+ HXPefeCEQk/IOlsMQU735m+zUN8fwlQAL6og2qzPILubbCeAJMQEYxwKn0H7Ra2Nn/WI nxxHer/F9t0zIczQI4qm1qSCKLOBaFGQaUOhAfZtBrlOaHGdKmGhfoUFg0GbhvtwGtUP QOfggF9aYHbzM4m0mkkP9RZkQmKR/F13nmnZZPjzeUT93o5rZVqN3yHyt16UYksJ6+en X9aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=LykX6xGIl2wRYi0o9Z9WARdITFqFb2/ddeZCLUa0EhQ=; b=MaPxj7lPfifxwRLHbtz8ZzkhCdDafw4uBKjJZRGf6wK+GWBLfJaBWFffKJlhXsJRhP 0e/mYZTMfnXP4AF3Cqi4Xk6RBz6/cegTAPDBq1yvWyxBfBxpN7FAslK+mncIi/I6bMrl YFrl4Phbg8nZrBI1AoJabvr9F88Xue/7ZzIj73pPs5Zp5quEZsm4zkNZ+Koxc3ahNC4o 2ZXxdSvKRATYnc4N5SRKj2nl8/+aXfTNzrvBNeNvfFLlMPxBJPX7dmmNWfqD5zwzTgSQ kIjNX1pv9YdNuO6/GQYuOI9TQvxUvBspZ6jykbj9Fzliq0RbQ1Nidl8nFdUs8tKN0LDC b88A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=k6bbeQIh; dkim=neutral (no key) header.i=@linutronix.de header.b=HMeFuqbk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s80-20020a632c53000000b0049f3be3d212si17458412pgs.141.2023.01.12.04.17.40; Thu, 12 Jan 2023 04:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=k6bbeQIh; dkim=neutral (no key) header.i=@linutronix.de header.b=HMeFuqbk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230324AbjALMRO (ORCPT + 99 others); Thu, 12 Jan 2023 07:17:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235030AbjALMQh (ORCPT ); Thu, 12 Jan 2023 07:16:37 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A4E25FB9; Thu, 12 Jan 2023 04:16:35 -0800 (PST) Date: Thu, 12 Jan 2023 12:16:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673525793; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LykX6xGIl2wRYi0o9Z9WARdITFqFb2/ddeZCLUa0EhQ=; b=k6bbeQIhgzdUSmphnnfRpN70RCzslNPnsr/6vQ3CeVQZ6tW3WF9JaEKTSfjXt9nqnbOXUg S5STKqmRMM7uR5zDE83137jDxGCuO91aGiaLoja3q7yP70Vhnj5Yn/N/EKiHM5Cvl8zjw/ IANyYZu18pvOykMLDRZ48lMhhrDfnHaJzLqcbwOsWav+GfiTF4QXMRcendX15E5dbUNZuy umaaahURmKcVsxAU0mkdSM9gX8j4wwTcP4dYwMb/RGJKmsUE9OxKmMwWBRjrNSjvLcUQBe t+TApAzGqJT54mLlqs/N5TAK4agISZN1Fjlhigf1hj6bLeiPjnPeoYm6BJXLJg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673525793; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LykX6xGIl2wRYi0o9Z9WARdITFqFb2/ddeZCLUa0EhQ=; b=HMeFuqbkRPlSUK2YTdQPDT+x7t0DmI/a/FR0pu70V/26WJ55M9fWyCcFVtBWvVvT906GWB RAXqeqfCVllv3CDQ== From: "tip-bot2 for H. Peter Anvin (Intel)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cpu] x86/gsseg: Make asm_load_gs_index() take an u16 Cc: "H. Peter Anvin (Intel)" , Xin Li , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230112072032.35626-4-xin3.li@intel.com> References: <20230112072032.35626-4-xin3.li@intel.com> MIME-Version: 1.0 Message-ID: <167352579295.4906.1690898852505380960.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754819065107784317?= X-GMAIL-MSGID: =?utf-8?q?1754819065107784317?= The following commit has been merged into the x86/cpu branch of tip: Commit-ID: df729fb05ae2db52f7de150439392a88ee9d9b4f Gitweb: https://git.kernel.org/tip/df729fb05ae2db52f7de150439392a88ee9d9b4f Author: H. Peter Anvin (Intel) AuthorDate: Wed, 11 Jan 2023 23:20:30 -08:00 Committer: Ingo Molnar CommitterDate: Thu, 12 Jan 2023 13:06:36 +01:00 x86/gsseg: Make asm_load_gs_index() take an u16 Let GCC know that only the low 16 bits of load_gs_index() argument actually matter. It might allow it to create slightly better code. However, do not propagate this into the prototypes of functions that end up being paravirtualized, to avoid unnecessary changes. Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20230112072032.35626-4-xin3.li@intel.com --- arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/special_insns.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 15739a2..7ecd2ae 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -782,7 +782,7 @@ _ASM_NOKPROBE(common_interrupt_return) /* * Reload gs selector with exception handling - * edi: new selector + * di: new selector * * Is in entry.text as it shouldn't be instrumented. */ diff --git a/arch/x86/include/asm/special_insns.h b/arch/x86/include/asm/special_insns.h index 35f709f..a71d0e8 100644 --- a/arch/x86/include/asm/special_insns.h +++ b/arch/x86/include/asm/special_insns.h @@ -120,7 +120,7 @@ static inline void native_wbinvd(void) asm volatile("wbinvd": : :"memory"); } -extern asmlinkage void asm_load_gs_index(unsigned int selector); +extern asmlinkage void asm_load_gs_index(u16 selector); static inline void native_load_gs_index(unsigned int selector) {