From nobody Wed May 8 20:32:27 2024 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 header.i=@amazon.com; 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=quarantine dis=none) header.from=amazon.com ARC-Seal: i=1; a=rsa-sha256; t=1705431161; cv=none; d=zohomail.com; s=zohoarc; b=Wis9mrlxMtZHjrbALGyHkRcPcR0k2TcbNfl1M60rIQ15/YBlEMj4gcKMy8w2RLxux+JVDqS0hUh/vrJoD8yMxGKrqsITQoFIIxCV3ecN9NXXnr1ppYqsuTPoqQ+RAiycQ8EqHGuLCay+gTwjC3mnwoDdk1I+e8mbeGCsm88BeJM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705431161; 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=tb2fNfqN0eF/OdROl8BG6kceQk3KA1cAs0YAyUr8QAc=; b=jgrUyYuvIr1OJNW1aEdpVhxSba6/wziD5qv9GB5dJKRN/tQbDqXvt+W9CVbYioPDVquSh/EoaTyPK1zmkJ4gXv/vAU3+sj3XYjul1RZW5CShTL7hVv0QJe9XWBXUWdqhcL1aD2dv3Q4CSPKzk9W1ur+PJ1Od0d+9BoHNKGtx0as= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@amazon.com; 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=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1705431161854414.3559505307047; Tue, 16 Jan 2024 10:52:41 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.667966.1039782 (Exim 4.92) (envelope-from ) id 1rPoXr-00076b-SD; Tue, 16 Jan 2024 18:52:19 +0000 Received: by outflank-mailman (output) from mailman id 667966.1039782; Tue, 16 Jan 2024 18:52:19 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rPoXr-00076N-OS; Tue, 16 Jan 2024 18:52:19 +0000 Received: by outflank-mailman (input) for mailman id 667966; Tue, 16 Jan 2024 18:52:18 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rPoXq-0003xp-NR for xen-devel@lists.xenproject.org; Tue, 16 Jan 2024 18:52:18 +0000 Received: from smtp-fw-9105.amazon.com (smtp-fw-9105.amazon.com [207.171.188.204]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5d845d05-b4a0-11ee-9b0f-b553b5be7939; Tue, 16 Jan 2024 19:52:16 +0100 (CET) Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2b-m6i4x-a893d89c.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-9105.sea19.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2024 18:52:11 +0000 Received: from smtpout.prod.us-east-1.prod.farcaster.email.amazon.dev (pdx2-ws-svc-p26-lb5-vlan2.pdx.amazon.com [10.39.38.66]) by email-inbound-relay-pdx-2b-m6i4x-a893d89c.us-west-2.amazon.com (Postfix) with ESMTPS id 38D4840D76; Tue, 16 Jan 2024 18:52:10 +0000 (UTC) Received: from EX19MTAUEB002.ant.amazon.com [10.0.44.209:59869] by smtpin.naws.us-east-1.prod.farcaster.email.amazon.dev [10.0.57.22:2525] with esmtp (Farcaster) id b69868bd-f6ba-477d-852c-47807dd1cb29; Tue, 16 Jan 2024 18:52:09 +0000 (UTC) Received: from EX19D008UEC004.ant.amazon.com (10.252.135.170) by EX19MTAUEB002.ant.amazon.com (10.252.135.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 16 Jan 2024 18:52:05 +0000 Received: from EX19MTAUWB001.ant.amazon.com (10.250.64.248) by EX19D008UEC004.ant.amazon.com (10.252.135.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 16 Jan 2024 18:52:05 +0000 Received: from dev-dsk-eliasely-1a-fd74790f.eu-west-1.amazon.com (10.253.91.118) by mail-relay.amazon.com (10.250.64.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40 via Frontend Transport; Tue, 16 Jan 2024 18:52:03 +0000 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 Sender: "Xen-devel" X-Inumbo-ID: 5d845d05-b4a0-11ee-9b0f-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1705431137; x=1736967137; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tb2fNfqN0eF/OdROl8BG6kceQk3KA1cAs0YAyUr8QAc=; b=BsKioGJPSe+yEEJ+2aHUPFVqFkZNhK8VOI7pByqG7X3+2bT1l+N9nz0Y MYie2gMtFVOL0lzJjnMIS8r72kKI30b4GEiqV6bOPUGosVLicKsjWtKCN ZOAc6zdJ+epvokQujYn0v4QszMKU/ZINzO8o4/DQrFWpM4nJpSL1R7ern A=; X-IronPort-AV: E=Sophos;i="6.05,200,1701129600"; d="scan'208";a="698182050" X-Farcaster-Flow-ID: b69868bd-f6ba-477d-852c-47807dd1cb29 From: Elias El Yandouzi To: CC: , , , "Elias El Yandouzi" , Jan Beulich , "Andrew Cooper" , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu Subject: [PATCH v2] xen/x86: Add build assertion for fixmap entries Date: Tue, 16 Jan 2024 18:50:45 +0000 Message-ID: <20240116185056.15000-17-eliasely@amazon.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240116185056.15000-1-eliasely@amazon.com> References: <20240116185056.15000-1-eliasely@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: Bulk X-ZohoMail-DKIM: pass (identity @amazon.com) X-ZM-MESSAGEID: 1705431163359100001 Content-Type: text/plain; charset="utf-8" The early fixed addresses must all fit into the static L1 table. Introduce a build assertion to this end. Signed-off-by: Elias El Yandouzi ---- Changes in v2: * New patch diff --git a/xen/arch/x86/include/asm/fixmap.h b/xen/arch/x86/include/asm/f= ixmap.h index a7ac365fc6..904bee0480 100644 --- a/xen/arch/x86/include/asm/fixmap.h +++ b/xen/arch/x86/include/asm/fixmap.h @@ -77,6 +77,11 @@ enum fixed_addresses { #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) =20 +static inline void fixaddr_build_assertion(void) +{ + BUILD_BUG_ON(FIX_PMAP_END > L1_PAGETABLE_ENTRIES - 1); +} + extern void __set_fixmap( enum fixed_addresses idx, unsigned long mfn, unsigned long flags); =20 --=20 2.40.1