Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp1015811lqp; Thu, 23 May 2024 06:56:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVoklzhI9WeIBYbKv3nUe07NOnlr+RF6i6+2Uz03wUqML39A7CDmDPQHhGFtPIqezwg3x1XeAtrqMR5m+ERMfrRLdht7LgoEGTA+/ihmg== X-Google-Smtp-Source: AGHT+IE7HmC4OleRp/pg8VU3+4qIDi8nsHSrjyIrK7D+9J3Z+lDmoUygoa3vZFqomdEg/vXBxS/r X-Received: by 2002:a17:90b:360c:b0:2bd:eb72:9fd4 with SMTP id 98e67ed59e1d1-2bdeb72a095mr2144464a91.23.1716472602330; Thu, 23 May 2024 06:56:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716472602; cv=pass; d=google.com; s=arc-20160816; b=yJ95MCh4jKmA9v2jWU05yDLTPT/I2UeoH0LsX20hoz+edxdF4CAHtVri5pS4aw7UJR fUVbb542Fg1u3c0CdsRclF3vp9NPSafHo8Z1fGKtAwQoFvLXON1Bh7bDf4UPyKTOEXb6 i0Fj1XQUGYR+h194Z/SMS9b5a3KMO1pM0a6lwJay/B7mjbn88VGawoqXCsDKgqt57UJ3 f2o7KZ5XlXfC61TfhlTB9hp5idAt8qQ5O2PiuUxpT8PERn/mR7UXXxObAH798asmXcfk Ou0OP6tPrwsx5foJHkXcoMNlU5WvOczNxr3mUYAw6Cwib6dziqNncMR+RCq6lQS99WFs gVDA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Rb9zuFDKkhtMy4oqwWvPQfIE6qPSc4vUY6DtnNr1SPY=; fh=hKHrqLglyjblKOrcX7Mpbm+AFTethacrS7iyLfuzeGY=; b=OUZJBNj3Gn7LM7LyW12JxsvwsZu+0aoYa9rJwX5vF78HlqzIpsxkzNdxXseVvotXMy 9GcUgUOT8M5vvM/GO7zwFCZp69rF9OTvx9874T8Jts/8IgldZnn5LvsmGWf6ZMFwf5yl 9b6z2uBTl7YP32hNtrNCbFVcYXvYP4yRBWgGeUXrbsjsAFIAiXxYrc41eEJ1+exL//LV 9OKPqNYCNWq7drxpCj63TzikvJc/lA46k0A2nogGtS3Xrve+kOBKZUVo1lgbuBdw62Hq E1rTAnAZrkjwZrUrgQJnwy09nh3cJW0RNxnldc4PPOWAC6C/QaBXRU6CwaEhKE7HYCAa hN+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fuS+e5JH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-187483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bdd9f4ddbasi1629970a91.98.2024.05.23.06.56.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 06:56:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fuS+e5JH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-187483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187483-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 8F773B21F97 for ; Thu, 23 May 2024 12:41:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 480E8148835; Thu, 23 May 2024 12:41:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fuS+e5JH" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (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 DADC01E4B3 for ; Thu, 23 May 2024 12:41:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716468063; cv=none; b=svUf4/YRUUrQKLZhCz+3mB2PHnKRKacmrE0t/lbQf5W8474VzGK8aRxIT6618mD8XIFhDrHEI7ah7F9IhEAVzxSdLctrS6+hEcyF9eLhJ3sVB161ztRXpvg5VDkjmQW+hLA5h/Vyo+C3vOPuCrnnGp7Q34cjHzN/WBFghgLEgG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716468063; c=relaxed/simple; bh=TACJdT4OuSHZHHTmCDOU5pephYt4f6iNsHPpUY1BkX0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uFJWSmbM6n8tqrPl4ZdJ5f/PcO3n4hpX1z4CypUOWXhr71qDl1PhVF1TvlVUuSwqGI9IV7e/wzP5HqmMA/gVF+cRTw5WOVkIOiB71JJLtE/HWWB3KD0N3vgOM0JTvraPMcB75WUaBZ5B9ywWqRouOp/mDXGpv3qp4iPFZBMyM2E= 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=fuS+e5JH; arc=none smtp.client-ip=198.175.65.12 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=1716468060; x=1748004060; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=TACJdT4OuSHZHHTmCDOU5pephYt4f6iNsHPpUY1BkX0=; b=fuS+e5JHvi3d+yVlpEY6oZuRBzoqGd9gWyRQxXBsrDrJcoUj6btrq4KC YQ2XsRLi4INOgvPRzRbmRS5uFSXearIBOErEJQZcSyO+RPTPR6Lcl0Exq PZEQwH4LuFfAqsrnirr63KlEOSuvEOg3x1oitI6webXITmChMrCOo8Fi3 aqWSY1bZa0bgZtSr2BastHup6mL9c7/m8G9usWcnQJH8x8IQqa8ONfTF4 NA74F9N04ny1QrbJRjMoeZd97EahASC3prWuqViDPNchgDnCxKlUU+cMX 8SKHdRSFv8i/W5UmbmzFgpovpO7rX7ByZuTn33Bs30XiONat0A+TSHQHP w==; X-CSE-ConnectionGUID: BetmY28SShKMU8D8jRIMCw== X-CSE-MsgGUID: 7Nggqdh+TUqNAfPUoRrrmA== X-IronPort-AV: E=McAfee;i="6600,9927,11081"; a="24191185" X-IronPort-AV: E=Sophos;i="6.08,182,1712646000"; d="scan'208";a="24191185" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2024 05:40:59 -0700 X-CSE-ConnectionGUID: 09+nUypJTuqZaMuj77Scsw== X-CSE-MsgGUID: 3oFoL+ayQF+Oxc1jncHy0Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,182,1712646000"; d="scan'208";a="71067955" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa001.jf.intel.com with ESMTP; 23 May 2024 05:40:59 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id CD271E7; Thu, 23 May 2024 15:40:57 +0300 (EEST) Date: Thu, 23 May 2024 15:40:57 +0300 From: "Kirill A . Shutemov" To: Wei Yang Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Steve Wahl Subject: Re: [Patch v3] x86/head/64: remove redundant check on level2_kernel_pgt's _PAGE_PRESENT bit Message-ID: References: <20240523123539.14260-1-richard.weiyang@gmail.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=us-ascii Content-Disposition: inline In-Reply-To: <20240523123539.14260-1-richard.weiyang@gmail.com> On Thu, May 23, 2024 at 12:35:39PM +0000, Wei Yang wrote: > Remove a redundant check on kernel code's PMD _PAGE_PRESENT attribute > before fix up. > > Current process looks like this: > > pmd in [0, _text) > unset _PAGE_PRESENT > pmd in [_text, _end] > if (_PAGE_PRESENT) > fix up delta > pmd in (_end, 512) > unset _PAGE_PRESENT > > level2_kernel_pgt compiled with _PAGE_PRESENT set. The check is > redundant > > Signed-off-by: Wei Yang > CC: Thomas Gleixner > CC: Kirill A. Shutemov > CC: Ingo Molnar > CC: Steve Wahl Acked-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov