From patchwork Wed Dec 13 13:00:01 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: 177979 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7754798dys; Wed, 13 Dec 2023 05:01:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpoAYy3L9kncFqJFkqZxOfwWjyoYuQHva8ro5M/+ht1EpX0/J0PzS324zPXngmgdsNGyU2 X-Received: by 2002:a05:6e02:170f:b0:35d:59a2:1288 with SMTP id u15-20020a056e02170f00b0035d59a21288mr12568325ill.52.1702472469780; Wed, 13 Dec 2023 05:01:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702472469; cv=none; d=google.com; s=arc-20160816; b=MtZm2lyF10SDuZtsUdeIaP4nRlkfDhiEHUgq2gYTIl/XCJGEXufM6AViqQO7d2RjJK EHTQ15Es8M/UT5wvT/3euw4KAj/ECMWp9LGAQ5/E+194gBH4luOUlEYdoK8RdTfz1ltc 5p3ypqfDdUFgffaui1qQtHm6MZMO+Z9iEbZW5c+Y/6MzJEfbIP2KEU/cFWuh+6sCtyJt pjHtXKKQrIf1dZzr147EfhHoGb11PhOqPSQflCMMvlQfuDHsd6xi6izGllmnHbQjd1lL HOD/TOMM2f2B92z+YP6XRLFQscFV2qaSw7LUxKzOwcIvqkKV8TflZQAoZaP0njjW3Btj S2hQ== 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=S+IhSpyWTQ/axW+CWLsdfkEGbDn1Jz0prTjI1ZqS1To=; fh=FZ760BpCS5Nek9ALcG2HF38HHnsKGk1BPcJPAVRmV5A=; b=QU+uEl1Po+/v8pWVK17MKMoiMIZ0klypWCgWjoqWD4PYxBelQZm8ojtx7p7eQtxfW2 s9G9M9OoJ6egJK7UWqSmypZ1/siv091EEOso+mCNuWEpDL+GQCcd54KBGb4bVuGn3Z4r 4YZFf+0vG2kkkRUcAIaOFz21Dd2LXCV7OYSrV0IYM6F4Tzpe3WU/YkpydjgX55s7VPvK KrCacdZcW2fpNvc9s/eiSkVVPmsceSludVaczYmOCHj4GO993kUWVdvpnomTPz6Ss9wG Pu7+uPXU+1JRJQnwEEgbL461CKSIhgKUKWkzAoHgWYbXYzbfJ0KDA2Z8+Wc3qgakV2d/ Qh8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NLSslS5I; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id cn6-20020a056a020a8600b005c65c11ad0dsi9368355pgb.772.2023.12.13.05.01.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 05:01:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=NLSslS5I; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9AE0F80747A1; Wed, 13 Dec 2023 05:00:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233583AbjLMNAF (ORCPT + 99 others); Wed, 13 Dec 2023 08:00:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233434AbjLMNAB (ORCPT ); Wed, 13 Dec 2023 08:00:01 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C046FE; Wed, 13 Dec 2023 05:00:04 -0800 (PST) Date: Wed, 13 Dec 2023 13:00:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702472402; 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=S+IhSpyWTQ/axW+CWLsdfkEGbDn1Jz0prTjI1ZqS1To=; b=NLSslS5ICLrIG0BxDdoCbbqWBzKURefiIdkAqp6AELB3x5kzY4lWsUyRN7BicbAdIU3P5r aeFGCVmK3Md/cgpu/PO2HltA7v6oi0PU5hWwao0rvj18HBA6yctmmpeKjIq4A3XJ6vXde0 DEQuAKfPyKuwUMBsM34WdojmVhTp5X/8WjsrODHpRJEkkJfOypVwGuYYhMuacU857nR5tT K+LP6/YxDFTHdAGvXLTTm4F2N/amBoBlnmQDGq//NofKk+oSgmU4Hh8kzKw42WXyeeQLAC aiRIq3LUSFICZrBAFqisMau5uGVjs6BDccWjQhDcG3w72hQb+7qR9ngoDjjK7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702472402; 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=S+IhSpyWTQ/axW+CWLsdfkEGbDn1Jz0prTjI1ZqS1To=; b=ycDsrcYyqZcAmxl5g3k2nWUHrcDtAlf3ykcleR3oWS7Olx3enzWBCxQmyj8+7/DezZ37So uPg3HAvwqWdZQCDA== From: "tip-bot2 for Uros Bizjak" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/head_64: Use TESTB instead of TESTL in secondary_startup_64_no_verify() Cc: Uros Bizjak , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231109201032.4439-1-ubizjak@gmail.com> References: <20231109201032.4439-1-ubizjak@gmail.com> MIME-Version: 1.0 Message-ID: <170247240126.398.13145604902928035582.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,T_SCC_BODY_TEXT_LINE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Dec 2023 05:00:22 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785171772244168918 X-GMAIL-MSGID: 1785171772244168918 The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 7d28365a06af74cee015a448d32ab6e98cd05cfb Gitweb: https://git.kernel.org/tip/7d28365a06af74cee015a448d32ab6e98cd05cfb Author: Uros Bizjak AuthorDate: Thu, 09 Nov 2023 21:09:56 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Wed, 13 Dec 2023 13:35:38 +01:00 x86/head_64: Use TESTB instead of TESTL in secondary_startup_64_no_verify() There is no need to use TESTL when checking the least-significant bit with a TEST instruction. Use TESTB, which is three bytes shorter: f6 05 00 00 00 00 01 testb $0x1,0x0(%rip) vs: f7 05 00 00 00 00 01 testl $0x1,0x0(%rip) 00 00 00 for the same effect. No functional changes intended. Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231109201032.4439-1-ubizjak@gmail.com --- arch/x86/kernel/head_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 086a2c3..1f79d80 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -182,7 +182,7 @@ SYM_INNER_LABEL(secondary_startup_64_no_verify, SYM_L_GLOBAL) /* Enable PAE mode, PSE, PGE and LA57 */ orl $(X86_CR4_PAE | X86_CR4_PSE | X86_CR4_PGE), %ecx #ifdef CONFIG_X86_5LEVEL - testl $1, __pgtable_l5_enabled(%rip) + testb $1, __pgtable_l5_enabled(%rip) jz 1f orl $X86_CR4_LA57, %ecx 1: