Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp558780lqb; Wed, 29 May 2024 04:18:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWpiH/a9yXL2z4PxAXGHQcLGcBIoGQype/whTau734oWaXm/acklcs7RbQhKxWOt8kqnSNJKZa2gKdG4zV2CJFnO49alwivPE0xTWuM5w== X-Google-Smtp-Source: AGHT+IGuSin8Rz/878Ci7W4EbTelFK9sAmKdBcyVMeeImTDSKTsJ0Y193wX/w00e//sIgE3XNeu8 X-Received: by 2002:a05:6a20:a107:b0:1b0:2421:4341 with SMTP id adf61e73a8af0-1b259a29f45mr2607529637.9.1716981502248; Wed, 29 May 2024 04:18:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716981502; cv=pass; d=google.com; s=arc-20160816; b=MvVDCRzkZ/1Z0BTqmxp47V2qirQU15ZMSGLGEOxdZBNCTpyeVPstA87v2o0Q2YG/Hq TgKBdCS4j6EyaLqaBrLhqVV6Rgp/tuX8do+t1X1ScbcemHQ3TWCXVamibBfYzltbHm38 t2QleL88kQnb1WwTBchwBo/2iTmP94UJkWofqlhY1ThjHR1wAd9x8Zvwj5bSyYWnp4dZ i6A0SQO8Fm7qqdq3SqkHtFAHi2c+vXzJ9onY4uhxm8O0YE53Thy3YNWCAGM73OXp/ydO PFV+3t6tqWAfoyC7Y/NjJtztRiPiM733Hh6eA3qF3Hzm3T4aQ4oNkpFESey/WDMCvjT0 4czw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JMojjsC052LhOfLbFE4+01csOQu4d5AdkKiOuwVWKEM=; fh=4k0b0cKA7pG2gLDh0p9+OBM8+Sz2sjXRBAQ4Y15gYcE=; b=f+5tC59qXcdcI++1qqs8/VJA1ahzl3gqGRKI2Z6B9oR5ZeKWvE198nnwB3gZw5Ez6J +2dR6THR6uy7Kx0A2znuBJp2Hp+0Gy4JgmCEuLIZKLiNz2kWfUDUGs5ho639yBdfi2xI FapTfFM3orwRZTsE2ESmaeduiCNx0GVrn9A8+vG2vjhuS7Zh309see99helHDN0PNPuo 1szUKC7+77TndvrazvEM+5xk1ZQTGn6yt6+nKE9SMvAsyOdAL+oOlddUhEOD6LfMzp9H O2fpDQLlqOV3TTDHY1NO0Tj4YzdSCoYNujpb0hmH+VccLT+jwGi5+ee0N8hpd3W2YCjP 88EA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L0tjEdwL; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-194001-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194001-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-68222db1158si10492669a12.222.2024.05.29.04.18.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 04:18:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194001-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=L0tjEdwL; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-194001-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194001-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id DAF5A286212 for ; Wed, 29 May 2024 11:18:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC1F2180A8B; Wed, 29 May 2024 11:17:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="L0tjEdwL" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF3E8178CCD; Wed, 29 May 2024 11:17:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716981459; cv=none; b=lqRD3CcLwIHBYZ2qXEXwgEPlYjtYn2pFTp2tZuhNxUvkNorL5ZjkoNYnt8sf+2c6lbheZXqj4HLj3BDepzcML9gB67GRMDdjkmjloIlLN4i8q6VWN0nFgr4qEaefpGmO/c1w58w5BMFj7gLtqGeYgJP4f/t/Zon1Nc27k/zumdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716981459; c=relaxed/simple; bh=3SX+KJOmxPem9SO7R72o7juGuVC2oqAj0VD9rc9VaoM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N1UlO11JOeNGixnHtQ95/VfNEbhEgv2PoBYKcP24cpLc5lqqfdwCXuthXZ8bUHAI/nxeQQUgNQhUH1EfcVyETda6xXPRnh9Px1C4j8uZjQUZv/8oUqIPmC/oErcfhWXonEkUT0zOJ+lPsFIJKaEqgIux6t+P6yX76c0R9TKFP8c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=L0tjEdwL; arc=none smtp.client-ip=198.175.65.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716981458; x=1748517458; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=3SX+KJOmxPem9SO7R72o7juGuVC2oqAj0VD9rc9VaoM=; b=L0tjEdwL85J8CunwnnYYybj41fFjE6jO0ZXwhBiOU0VCk8fTN29JTl33 BedTBY+tvMIn5jXhLfgMcl5qaHPr0uE8rxBHyzzdRZOjOsZTY6+xi8lRW nHCPGQGmVpFTD3hribqCwKYD29k7HlxAAKdBWKNNvTNdpdntS0veG3UYH ngoFJLdNyltrdjRpJgJFNxfby9lRNycEujrddlr33Tr0L67/yqCzHRqlK JX9Qx5A2LaCA7EoyuspKKIP/sE1ZAKDJoNLJisgqLdgnMbe5CBDWNSLHI DBdmnahfgiBzDZL+AzktUfjkT7F174Or464OurAkVzgeBY31eZWETghb+ w==; X-CSE-ConnectionGUID: xscD8hDwQp+G54BBVkc9ag== X-CSE-MsgGUID: svlC32eMQP6mUZmi3Kswuw== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13498238" X-IronPort-AV: E=Sophos;i="6.08,198,1712646000"; d="scan'208";a="13498238" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 May 2024 04:17:37 -0700 X-CSE-ConnectionGUID: O37lca9aTrCOFhvDkx9QKg== X-CSE-MsgGUID: ezCnHFvXRqiqHhF2kf5l6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,198,1712646000"; d="scan'208";a="35874174" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa006.jf.intel.com with ESMTP; 29 May 2024 04:17:31 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id CA79320F; Wed, 29 May 2024 14:17:29 +0300 (EEST) Date: Wed, 29 May 2024 14:17:29 +0300 From: "Kirill A. Shutemov" To: Nikolay Borisov Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , "Kalra, Ashish" , Sean Christopherson , "Huang, Kai" , Ard Biesheuvel , Baoquan He , "H. Peter Anvin" , "K. Y. Srinivasan" , Haiyang Zhang , kexec@lists.infradead.org, linux-hyperv@vger.kernel.org, linux-acpi@vger.kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCHv11 05/19] x86/relocate_kernel: Use named labels for less confusion Message-ID: References: <20240528095522.509667-1-kirill.shutemov@linux.intel.com> <20240528095522.509667-6-kirill.shutemov@linux.intel.com> <1e1d1aea-7346-4022-9f5f-402d171adfda@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1e1d1aea-7346-4022-9f5f-402d171adfda@suse.com> On Wed, May 29, 2024 at 01:47:50PM +0300, Nikolay Borisov wrote: > > > On 28.05.24 г. 12:55 ч., Kirill A. Shutemov wrote: > > From: Borislav Petkov > > > > That identity_mapped() functions was loving that "1" label to the point > > of completely confusing its readers. > > > > Use named labels in each place for clarity. > > > > No functional changes. > > > > Signed-off-by: Borislav Petkov (AMD) > > Signed-off-by: Kirill A. Shutemov > > --- > > arch/x86/kernel/relocate_kernel_64.S | 13 +++++++------ > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S > > index 56cab1bb25f5..085eef5c3904 100644 > > --- a/arch/x86/kernel/relocate_kernel_64.S > > +++ b/arch/x86/kernel/relocate_kernel_64.S > > @@ -148,9 +148,10 @@ SYM_CODE_START_LOCAL_NOALIGN(identity_mapped) > > */ > > movl $X86_CR4_PAE, %eax > > testq $X86_CR4_LA57, %r13 > > - jz 1f > > + jz .Lno_la57 > > orl $X86_CR4_LA57, %eax > > -1: > > +.Lno_la57: > > + > > movq %rax, %cr4 > > jmp 1f > > That jmp 1f becomes redundant now as it simply jumps 1 line below. > Nothing changed wrt this jump. It dates back to initial kexec implementation. See 5234f5eb04ab ("[PATCH] kexec: x86_64 kexec implementation"). But I don't see functional need in it. Anyway, it is outside of the scope of the patch. -- Kiryl Shutsemau / Kirill A. Shutemov