From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 358A83BAD94 for ; Mon, 6 Jul 2026 17:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783360123; cv=none; b=hSiaxs+bM1jT6pUjkh6fKXWetRnUwlO9uC8/dM5fWDEMC6B7ojznujPMdAQ49GQ7/Y9Kcb/oIzi31ws9mK9p5bVafotABvoH7SE0z9Y/P0wyuiedLEt6gNXcJxPyuQMX6oWV8AjX6rK8mm0W8+sd4gsWA2rQzRsxNYZ46w6wEzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783360123; c=relaxed/simple; bh=vWinFTXnNVNHnMql8G8n1azKsmpno6LMDwZ07PpL4HI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NTR/VNyweRld1ZoouXsmeuTKqAQ+vhdVWbelM6p4W3kGI3dm8Yn8xF/3q2Zfyyc1osilO7ecNLwkwG5lZRulz/inijXw5tUjrDvc3cmxGDAxvGQqjZ1bCAGL1bQQBxQyHdT9YHYJNQr1GoPuzS6nk2z8NhDCZ6o+Jsgj6Dfbmi0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UK3fwJz0; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UK3fwJz0" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-383b4a3755fso2534871a91.3 for ; Mon, 06 Jul 2026 10:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783360121; x=1783964921; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=jHIujCKTOGPNugTb5N8DODxujrY7RJkaEbg7hUbcIIA=; b=UK3fwJz0BkuNO9Cl59CPf+xtLPAWrLNOkGwbdLcJYeT+SDmEmqqoDkOCjlVFWVZ33e EuX6egYkrVf/+FfWS77PWbRLjj4lnt2hGNsrvKCykUUREYMX6AtYX2kBqwv7lBqr7lfQ JuDWmy99U8ZKwM5rqtkqwhcPVgrXCatua0gzXJlwZiwUTWZ9rRxxFQWNTOm82AB79DEL WO37xr9CFbI3zzh67WEFg94ITvGmBBWBN8TMmBJ+jQfHcEZtXi5LITK5rgWJsFfxT1yl afpBr6lGGeBqHVxT38d67fhcvavesh9He7zCGMMTLyhwrHfzJ5Uy1/IaoH1JVUTJRamG Yerw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783360121; x=1783964921; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=jHIujCKTOGPNugTb5N8DODxujrY7RJkaEbg7hUbcIIA=; b=NG7SnQ82TVIxbuQjQQ4/naaGQEh2oiW5eZb2AP0cB2GZwxGqGw1p31EgAYcRAShPwz SAzbSgFpVBd5y65qqXumtP/f9MWQxgy1k+mgtCoSs3wf/jO26VxoUlabEyByRdSZC4sa LEs/1CPJ5prcsL1dCFw6ue96h1bfPPFNjAmF2fQxE8X1BhrqTlaqNO1WG++CaAcv+65C 4ZGwfnaKu0w5eenOHeH2ISWslfhoc/TEgaJBR01D63tzbj/ooE6TLWqdz7NSmxo1NO/f WzSDFxNoTxI9xMHeJ1+U/zlCKLi/H8C1VsmBctB7StD20xg9bbbFAqCNBzI87rxa5I0u Jbdg== X-Forwarded-Encrypted: i=1; AHgh+RpcSxIImUAjcYETtI5RtIq4IaFwlYRfhbCzONaMrBkpK6GiFTao1gheOcAxxkjlqr+1RD3u9hoBfNpQlEw=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5wsYwiuzQOBdfxK9fkJzVt+nz2yT0nn6yNXyMbCVf3cX21Lb5 ktYQBeKnE2EGqxe7hc1H6akH5iRUddKUV77VX9pu30MUTcYaHpg4L5zc X-Gm-Gg: AfdE7cnOa+VUkjM6d7Ll+LkhQereaNUyw2Lqsi6mXaL4ZbTCwxOc76lLg+SS5MG8J4K 9iV+9ZHTvb9DZ9RDuP3x/VTJdFCTTG4bUwY26jV2TzBcrJBY3R8HWcpd6ouKOmIEZAr3IXav1Fr 0Iw/ZxM3/Oa8/72KAAA6GIBXINAnX52JA/ubQ2E60Oe3fhpjqJXRcN/95yCjT22CvJKXv4qTQTI qdz8rJ/PW2UBWYTlW7NJM0eVjyUruulStkAWz9DKoLstsJbj6VAknpWdJVKUWEwugd8SMjybuZs G26sJNcAwpMjJV2fQcQ9eaMf9Xgm2VsMpc+h9VodF1R7vH11gJW/3AsqEsLZxwgO419IIW4rJm8 +8Azzq1c/ljZOOCfwL6VCJVe5b3eKLhUiMWShacVRGPGJekHfAdEW2x4prbK79gxJMYxYYddjE4 vd85SwwNYd9zxl6W10FcgWWmWom4IPWCIUs1R8NWDoT2is X-Received: by 2002:a17:90b:3f88:b0:37f:9ce1:cda4 with SMTP id 98e67ed59e1d1-38759019fc1mr1587029a91.26.1783360121520; Mon, 06 Jul 2026 10:48:41 -0700 (PDT) Received: from fedora ([2601:644:937c:6c90:6d4e:7b2d:4a39:fb0c]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3812801e8d6sm5515562a91.12.2026.07.06.10.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2026 10:48:40 -0700 (PDT) Date: Mon, 6 Jul 2026 10:48:38 -0700 From: Vishal Moola To: Dave Hansen , linux-mm@kvack.org, linux-kernel@vger.kernel.org, x86@kernel.org Cc: Mike Rapoport , Lu Baolu , xen-devel@lists.xenproject.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Peter Zijlstra , Juergen Gross , Boris Ostrovsky Subject: Re: [PATCH v2 0/9] Convert x86 pgd_lists to ptdescs Message-ID: References: <20260629185742.126987-1-vishal.moola@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: <20260629185742.126987-1-vishal.moola@gmail.com> On Mon, Jun 29, 2026 at 11:57:33AM -0700, Vishal Moola wrote: > This continues the ptdesc conversions for x86[1]. This is a necessary step > in preparation for the separate allocation of ptdescs from struct page. > Once ptdescs are not wrappers, the pgd_list should be used to find our > ptdesc, not page. > > In fact, after patch 4 we can successfully boot a 32-bit x86 kernel > that separately allocates ptdescs. > > All of the patches are rather straightforward, I just kept them split up > for ease of review. There are no intended functional changes as ptdescs > are currently still wrappers around struct page. > > [1] https://lore.kernel.org/linux-mm/20260211195233.368497-1-vishal.moola@gmail.com/ > > ---------------- > > v2: > - Collect Review tags > - Rebase on 7.2-rc1 > > I've compiled and booted both 64 and 32 bit on a kernel with separately > allocated ptdescs. I ensured the codepaths were hit for all the changes > except Xen. > > This applies cleanly to 7.2-rc1. Dave, can you please take this through > the x86 mm tree? Hi Dave, will you take this through your tree? Let me know if there are any changes you'd like to see, or if you'd rather this go through some other tree. > Vishal Moola (9): > x86/mm/pat: Use IS_ENABLED() instead of ifdef > x86/mm/pat: Convert __set_pmd_pte() to ptdescs > x86/mm/pat: Convert collapse_pmd_page() to ptdescs > x86/mm: Convert arch_sync_kernel_mappings() to ptdescs > x86/mm: Convert sync_global_pgds_l5() to ptdescs > x86/mm: Convert sync_global_pgds_l4() to ptdescs > x86/mm: Convert pgd_page_get_mm() to ptdescs > x86/xen: Convert xen_mm_pin_all() to ptdescs > x86/xen: Convert xen_mm_unpin_all() to ptdescs > > arch/x86/include/asm/pgtable.h | 2 +- > arch/x86/include/asm/pgtable_types.h | 2 +- > arch/x86/mm/fault.c | 8 ++++---- > arch/x86/mm/init_64.c | 16 ++++++++-------- > arch/x86/mm/pat/set_memory.c | 17 ++++++++--------- > arch/x86/mm/pgtable.c | 4 ++-- > arch/x86/xen/mmu_pv.c | 22 +++++++++++----------- > 7 files changed, 35 insertions(+), 36 deletions(-) > > -- > 2.54.0 >