From nobody Fri Oct 31 03:48:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1752696979; cv=none; d=zohomail.com; s=zohoarc; b=dM5wgx9QZLWPMSRUAKrE7Ti7t0moS7HaDpyS2lZGLnuHCjQq1dyWvSa2pvkkMmqUQ1vCORSfAemYYrttEyn/Ji5UQxJAqP+8A4aqwXsjbUMMP05+tYlPKkLJuquDWjKeiRk63J1Y3uDbb2pMC7Q8wdEryVIjeB9MIR/Krpa9Y+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1752696979; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IzTo23Sx/OEupN9XRs7aPIsAXHXRXpmD+YzCJ1BbJWk=; b=lup7Ufr8AJwAJF1w4RWQgWU+RG+iQtliBBjKhHomaPQukUjJSqVd0UYKhRw2B1P6Sou6Yu1IaDbBxzi6BFWlsYsLtY9U1OnvShY29pidpsxAQYYnHuj6AE2RHtHznbYIxMa7hO+f2iMwTPQSSFkhKXm7CsmhkStFfjshCsXe/CA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1752696979810318.59567492090866; Wed, 16 Jul 2025 13:16:19 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1045626.1415781 (Exim 4.92) (envelope-from ) id 1uc8Xl-0004AH-CZ; Wed, 16 Jul 2025 20:15:57 +0000 Received: by outflank-mailman (output) from mailman id 1045626.1415781; Wed, 16 Jul 2025 20:15:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uc8Xl-00049C-7e; Wed, 16 Jul 2025 20:15:57 +0000 Received: by outflank-mailman (input) for mailman id 1045626; Wed, 16 Jul 2025 20:15:55 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uc8Xj-0003uZ-IS for xen-devel@lists.xenproject.org; Wed, 16 Jul 2025 20:15:55 +0000 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [2a00:1450:4864:20::435]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ad226a9e-6281-11f0-a319-13f23c93f187; Wed, 16 Jul 2025 22:15:54 +0200 (CEST) Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-3b60565d5f4so21581f8f.0 for ; Wed, 16 Jul 2025 13:15:54 -0700 (PDT) Received: from lab.home (dynamic-2a00-1028-83a4-4bca-c0bb-96ff-feed-9d50.ipv6.o2.cz. [2a00:1028:83a4:4bca:c0bb:96ff:feed:9d50]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4562e7f2e8csm30504145e9.5.2025.07.16.13.15.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jul 2025 13:15:53 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ad226a9e-6281-11f0-a319-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752696954; x=1753301754; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IzTo23Sx/OEupN9XRs7aPIsAXHXRXpmD+YzCJ1BbJWk=; b=NzCE/gHXPwHwWx/jHmBvG3sE+XJuQ3cPySRNbByfjElxtpnzqQ4XQh5753nnfTCojw 67PNDRqqAqCM98gf/ARcRjswsJHtWpgdwZ88zFEyPx0RmASXSl0VifvejGMsxSBr9UTa hVSkPmR6LH1PrCZoLtBpzynf6IxR4WYwuLwR16ISs6eEttru8TxXazIWAN3p8ZsWqhf+ PLo+VwKLCQMK0jsuLLucU8ZUBEo7pCjjf+j2HiBlvPJbKu82kdivX70nTlbOhDW4K1TV /cmRtU+caTiauDfNbULVLBbMud8J9+IsNQ3uaSl/n5Tdh2eChRqFPRJNmfolZuFQ2LOG okDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752696954; x=1753301754; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IzTo23Sx/OEupN9XRs7aPIsAXHXRXpmD+YzCJ1BbJWk=; b=GcfBhx/q1qI1qoP7/ikT5yHh6DdYZrpc0GUmKIUmiSTiZD6YvOP/RE6R1+jsA3hYrP iAXuZPdrV4RRxPqzt2Pu4jD4sw9DaNW3JIe2vFaVjsKCJ0FRJBhSJ3+Q3MbxX/DFAt/k 68UvRdaQxmoeEuprReaxqRr3t6+KDbyYTUtu6daVXFAUS/S3jxFHx8gMEgCx1mXWWPC0 FQAWVu3/3BvQLqbtWiFIduW5+Rhy1r5lHLjsflqdtDQzVsQdnr3oO3cECYgPMi+AB6+4 lXyHTUCHCpSuMuEQPJEd/KQJnc+imuEGaB7UKF0zOaHHeb3KI6sAWJJ2NTjK0J85qUPi ky6A== X-Gm-Message-State: AOJu0YxR+gO8mVLgLNnsJEhT9LPBCV4DMVyVc81xI/v01VkGUuJGZ4cX WabIyah2tFyOJS7fXW5iEjr7Unsy6kalKBD6VU1/R6rM3Afez8S4WQcmBM9cfg== X-Gm-Gg: ASbGnctz5nKTZCWVEnFOn3N/0967P2Q7QlW/nrTsrc+ha6FczzKgwjKqjr0GCuw9HiR eAPgZOwsOAdiMH9XZKmI/qbsX+YCzLVbq89jdwLF5N/FJgfOWaZ9EVTDlun5yFNfFhmE5VIol02 B1PMKUltrj0k7jLWAQM4MejnrhYubfKAt58KxMHlVdN6xirSG1mRJL/KFZjIAY7+taGka7P6HRq LoGm2WhrfEAtzm/GH7TkxqrkDnLHXg32YLlLTAwD2L2q2a6B4U/v1HWGZ6hVLyj08j2YUyVsBIk sNKQtquG/TEVeXXv5etQQKDmwnpaOOsjtJY0YDgXEkIvvgh9JCTcbDDLgpKLptgZd2ax+vX2JTH qi1Wzy6sIMgm/GHs4AmH6N1c/VDLVP1TJ4+OOQJiUMRksM3YWV+yQZnhDc4vscPEzaA9ZJg24Gu 9I/m5hmRLySpeR4NcR//7JTg== X-Google-Smtp-Source: AGHT+IGUg2sOHjk/UznLZOKAg4XbtujlsyagSGNiX7D3hOlc6Ylmj+FAHvFVmCjIKetKab9fedznRA== X-Received: by 2002:a05:600c:1c16:b0:453:c08:a1fa with SMTP id 5b1f17b1804b1-4562df5475dmr17455585e9.0.1752696953569; Wed, 16 Jul 2025 13:15:53 -0700 (PDT) From: "=?UTF-8?q?Petr=20Bene=C5=A1?=" X-Google-Original-From: =?UTF-8?q?Petr=20Bene=C5=A1?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Petr=20Bene=C5=A1?= , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH v10 3/9] x86/p2m: Short-circuit p2m_is_altp2m() when CONFIG_ALTP2M=n Date: Wed, 16 Jul 2025 20:15:33 +0000 Message-Id: <4da736fc96d0d8ee717156957b3e8aa9aec92797.1752691429.git.w1benny@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1752696981233116600 From: Petr Bene=C5=A1 Wrap the p2m_is_altp2m() check with IS_ENABLED(CONFIG_ALTP2M) to allow the compiler to short-circuit the condition at build time when ALTP2M is disabl= ed. Signed-off-by: Petr Bene=C5=A1 Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/p2m.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/include/asm/p2m.h b/xen/arch/x86/include/asm/p2m.h index 4358cc15a2..58b56e575e 100644 --- a/xen/arch/x86/include/asm/p2m.h +++ b/xen/arch/x86/include/asm/p2m.h @@ -437,7 +437,7 @@ static inline bool p2m_is_nestedp2m(const struct p2m_do= main *p2m) =20 static inline bool p2m_is_altp2m(const struct p2m_domain *p2m) { - return p2m->p2m_class =3D=3D p2m_alternate; + return IS_ENABLED(CONFIG_ALTP2M) && p2m->p2m_class =3D=3D p2m_alternat= e; } =20 #ifdef CONFIG_HVM --=20 2.34.1