From nobody Fri Sep 20 23:50:13 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; 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=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1721232883; cv=none; d=zohomail.com; s=zohoarc; b=hvAqEJIVgxUUnwNuVaee3la1WRiAKofpd9g+uJmxRRR7EHVlxBDg++QSW/jSl+svsxa9nNgQlp8k4LRjkkCnFHgwe7jFiyLv2vXKiU+5c7WOzId6mucHB2L1Uqxk1o239Hwv4lQxMIUnlsxj4V7LmktdbU5P3BAdyM+8cANSqWs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1721232883; 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=J4qyb2Q8pmTavMu8lP6BG6l66WhcSIyplW6y2Sr0GR4=; b=ERDUbhVmrb8umaQMi+Yh/KpF4RjaXHw6x7tpPdfTfrPyydB1SgO7ABVaHOtBZcWM6YMrW5yZ+ayyFSs8XV95VDeBev5n/QCoadYlHs5heBf3lsB2e2GQZF7n5Xz2fGG6OLslaOr2rejilWHFK4RFjcSMA6+0KCaSIyK79XlbLWo= 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=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1721232883811779.438849772116; Wed, 17 Jul 2024 09:14:43 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.760076.1169800 (Exim 4.92) (envelope-from ) id 1sU7IP-0007js-Uf; Wed, 17 Jul 2024 16:14:25 +0000 Received: by outflank-mailman (output) from mailman id 760076.1169800; Wed, 17 Jul 2024 16:14:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sU7IP-0007jb-Pb; Wed, 17 Jul 2024 16:14:25 +0000 Received: by outflank-mailman (input) for mailman id 760076; Wed, 17 Jul 2024 16:14:25 +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 1sU7IP-0007cd-0C for xen-devel@lists.xenproject.org; Wed, 17 Jul 2024 16:14:25 +0000 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [2a00:1450:4864:20::536]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a1116879-4457-11ef-8776-851b0ebba9a2; Wed, 17 Jul 2024 18:14:22 +0200 (CEST) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-59f9f59b88cso2467408a12.3 for ; Wed, 17 Jul 2024 09:14:22 -0700 (PDT) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-59ff76e9851sm2064067a12.46.2024.07.17.09.14.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jul 2024 09:14:21 -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: a1116879-4457-11ef-8776-851b0ebba9a2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1721232862; x=1721837662; 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=J4qyb2Q8pmTavMu8lP6BG6l66WhcSIyplW6y2Sr0GR4=; b=ic+RTZsqos+QiI6gFCh77lXOKO4U/BHanCnMGFShOpITYfZIx15E1MgN/pkHosgkbQ NOHt78rlCa+hVG0tNz9DPIFAIs7fok32wESN0XJhHiYFSvskIrHgnXcLln8WDzqNQxNN r+rGe2DwGnxL17f7eJCY1kESKgqn98mJDnYoU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721232862; x=1721837662; 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=J4qyb2Q8pmTavMu8lP6BG6l66WhcSIyplW6y2Sr0GR4=; b=SB6L02hIbddP1Yec2gxhQA0de6MBV5LCOvY9ih4kR5ekqx9zUtXRE3X8UDQWaUsdFS eTetuGPFU6eVY8VUNdwR/kuZSgArON1qkkut2kMNIV3zD+nWrSDTL1ZdZPYolfSrNxCX Skcw3WPFHPcOTfvj/hbinUO4x72l+1a6SqWs1Vb9OPu+IKZadUeB8CuDVMwo1qfpxMFV H+jpKScvEjy/sugMClUQ4dc1Bg327uv30Mey5O/q6Et2iRRGmuc3ZYilEjBrbF5iDvEY jxDTE97hRYM3IF7IW/RImTAlhVNbdA44Q4nnE7RlgUIE7gUP9NMJDgAgJTKeHeWMqZHN WoOQ== X-Gm-Message-State: AOJu0YxiHmsAJUrt6Eb+HmNOO+rxF3mjz4iLvFgFmzBdq7uH5w8M9+bk 6DC9Csv9p0qZZJY12T3N9BQLaNgmqUhyl4nbruXH91H+gcVkEEiakojti5mb75B7bZPRYV+WuuP S X-Google-Smtp-Source: AGHT+IGIvS2ShxY2WkKbLfsrMI5Fza3y7YZ3JTKjaqhBi9LN2oyOYTXmNB6tdsxWF3bwKIAe23gX0w== X-Received: by 2002:a50:d5de:0:b0:585:4048:129a with SMTP id 4fb4d7f45d1cf-5a05ce11c37mr1509174a12.31.1721232861656; Wed, 17 Jul 2024 09:14:21 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 2/3] x86/mm: Move base_disallow_mask into __ro_after_init Date: Wed, 17 Jul 2024 17:14:14 +0100 Message-Id: <20240717161415.3586195-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240717161415.3586195-1-andrew.cooper3@citrix.com> References: <20240717161415.3586195-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1721232884200116600 base_disallow_mask is calculated once in arch_init_memory() and never chang= es thereafter. Write-protect it at runtime. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 0ecea0f707b2..95795567f2a5 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -150,7 +150,8 @@ bool __read_mostly machine_to_phys_mapping_valid; =20 struct rangeset *__read_mostly mmio_ro_ranges; =20 -static uint32_t base_disallow_mask; +static uint32_t __ro_after_init base_disallow_mask; + /* Global bit is allowed to be set on L1 PTEs. Intended for user mappings.= */ #define L1_DISALLOW_MASK ((base_disallow_mask | _PAGE_GNTTAB) & ~_PAGE_GLO= BAL) =20 --=20 2.39.2