[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 3/9] mm: use hw_pte_t for generic PTE table storage
- To: Anshuman Khandual <anshuman.khandual@xxxxxxx>
- From: Muhammad Usama Anjum <usama.anjum@xxxxxxx>
- Date: Wed, 30 Sep 2026 18:40:28 +0100
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=suse.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6Dj3mza0d7acfswRMgXyXAp0FLYQUvs4v9I7WURo1EM=; b=MnD0EdCDabWj74E/z59U1y+WE1cQ6sbz/KeCE+yTPbMaekQ58X7uBMUhuyde1+IgbBaXBkuPPvy6Cs85d1XvrXqx/QhLvfK8zM+ekLMJ/B+mXCLYfkOz7aXPJnE2deL3xM4eCgV64Ru0FVrNEgr+/ZZoa20HaDgwh+8IQmOV+Ih0kcEgguZ5F/LgDxOHY1P7GUAgvfWm+VuLZ7wJzcCB2/fvreFz51To9+Tjq3od021GWpwzEif1YJtv5YKRqKD/JUp+tZnFuym0u9fVNz26nrPq6EGJyL3GjzwMI3jWCdAV9kKOQ0+a2j90H5JaVVcu/QWzyl+KzVbElV9QkADqBQ==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6Dj3mza0d7acfswRMgXyXAp0FLYQUvs4v9I7WURo1EM=; b=VLFluQFA4wUPvgWQqHMQT8kDLgBsVRnxlZBM2UP9tj/aZn2yC8vHyHQ6aCyngsOl2jw1YVXg2vvUYrtRFUOjt2qSKRMJRLXwcLedBPPi/rSTLR6a58omQe6iS0Wy2Qy7j+InZjL+X7H7Nsw8dFepQKnkClXmiELQhiy59cz3a6X+33l1HbEA3fUL/r6kGULXPlrpsGNC4yAIchLd9ZWe9jIqgL+PG4kxLz0UfXY+FTQZGUyBohS33RTOyu6lSBqOGBis73hp3IXIcD6+/uVStswqXKLNKazfxIMVc6Wv1dgJGlfQ/NNyoOrvBOlL+Qg2X0od6iYBNk9IrjA4zDEiHQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=R9A+eYV9CpyZdJDZSh2W7EpxObEy9o4PI569HPFjRlH//nP+rv3hYm7LyMj05x6ZRfAMtnSi3MmD6M2SjxIBNxmyid82RnVbgMW/oS9vg+YMArAHJVFoofttTMC+VtbIWsF9a2q97R3bVABOOjvGKWPeM4OdRXlHuNV33Lrcfax+UizFF185Y9Qm2Lc3Lr0lg5P7KrljFCLYbJf5Se2PcbQeTmWmxwOYh0zOn+AEF6lAmwUxi4JoXMk1kdluEXfs6urpBByuYG4OEHvB8W+JbIKziVkZ/eRXhAGMXVe1zUNjbQZ+/L5FMn0o7ixsc5BMSfXV4/eE0G1BRjB385I69g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MUZQb3FAg7yfr2Gmy65jr58i8W7Vn13ARnWdNaUoxX4nsvwmwZAYBAvK52SM7RPBMA2jLKTeQjot5JDkgVcSPC0SS8AwTnJk98aLdlWmxhB5rSXOtR9ObN/iQuVdnX9h+nqy3v5PNsCyJlHIxrBuL8X0wN46uF7tSgaiHR6juqe3StVFe6EsN4NDOC1bxNmKJXhedpIAypEaraZX1M3DGRFk242WiBT7OFtCCP7JdLl0ExLB8cgNGhE/KrUI/Tt0BztagRXiX1POKo2JsuG+t/qydQMUn72csR4mKdNUwNAWwKN7iFmH3KJGd9CWc3hTXN0c/p7FDr7kHl8F0WvnqQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results-original: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: usama.anjum@xxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>, Lorenzo Stoakes <ljs@xxxxxxxxxx>, "Liam R. Howlett" <liam@xxxxxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Xu Xin <xu.xin16@xxxxxxxxxx>, Chengming Zhou <chengming.zhou@xxxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>, Muchun Song <muchun.song@xxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>, Pedro Falcato <pfalcato@xxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxx>, Nick Piggin <npiggin@xxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>, Rik van Riel <riel@xxxxxxxxxxx>, Harry Yoo <harry@xxxxxxxxxx>, Lance Yang <lance.yang@xxxxxxxxx>, Chris Li <chrisl@xxxxxxxxxx>, Kairui Song <kasong@xxxxxxxxxxx>, Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>, Nhat Pham <nphamcs@xxxxxxxxx>, Baoquan He <baoquan.he@xxxxxxxxx>, Barry Song <baohua@xxxxxxxxxx>, Youngjun Park <youngjun.park@xxxxxxx>, Uladzislau Rezki <urezki@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>, Masami Hiramatsu <mhiramat@xxxxxxxxxx>, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, Alexei Starovoitov <ast@xxxxxxxxxx>, Daniel Borkmann <daniel@xxxxxxxxxxxxx>, Andrii Nakryiko <andrii@xxxxxxxxxx>, Eduard Zingerman <eddyz87@xxxxxxxxx>, Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>, Martin KaFai Lau <martin.lau@xxxxxxxxx>, Song Liu <song@xxxxxxxxxx>, Yonghong Song <yonghong.song@xxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>, Emil Tsalapatis <emil@xxxxxxxxxxxxxxx>, Ihor Solodrai <ihor.solodrai@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>, Adrian Hunter <adrian.hunter@xxxxxxxxx>, James Clark <james.clark@xxxxxxxxxx>, SJ Park <sj@xxxxxxxxxx>, "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>, Leon Romanovsky <leon@xxxxxxxxxx>, Zi Yan <ziy@xxxxxxxxxx>, Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>, Nico Pache <nico.pache@xxxxxxxxx>, Ryan Roberts <ryan.roberts@xxxxxxx>, Dev Jain <dev.jain@xxxxxxx>, Usama Arif <usama.arif@xxxxxxxxx>, Kiryl Shutsemau <kas@xxxxxxxxxx>, Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>, Alexander Potapenko <glider@xxxxxxxxxx>, Andrey Konovalov <andreyknvl@xxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, Vincenzo Frascino <vincenzo.frascino@xxxxxxx>, Miaohe Lin <linmiaohe@xxxxxxxxxx>, Naoya Horiguchi <nao.horiguchi@xxxxxxxxx>, Matthew Brost <matthew.brost@xxxxxxxxx>, Joshua Hahn <joshua.hahnjy@xxxxxxxxx>, Rakie Kim <rakie.kim@xxxxxx>, Byungchul Park <byungchul@xxxxxx>, Gregory Price <gourry@xxxxxxxxxx>, Ying Huang <ying.huang@xxxxxxxxxxxxxxxxx>, Alistair Popple <apopple@xxxxxxxxxx>, Dennis Zhou <dennis@xxxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, Christoph Lameter <cl@xxxxxxxxxx>, Johannes Weiner <hannes@xxxxxxxxxxx>, Qi Zheng <qi.zheng@xxxxxxxxx>, Shakeel Butt <shakeel.butt@xxxxxxxxx>, Axel Rasmussen <axelrasmussen@xxxxxxxxxx>, Yuanchu Xie <yuanchu@xxxxxxxxxx>, Wei Xu <weixugc@xxxxxxxxxx>, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, Tvrtko Ursulin <tursulin@xxxxxxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, damon@xxxxxxxxxxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 30 Sep 2026 18:41:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
On 30/09/2026 5:35 am, Anshuman Khandual wrote:
> On Tue, Sep 22, 2026 at 06:12:31PM +0100, Muhammad Usama Anjum wrote:
>> Generic page-table interfaces use pte_t * for both pointers to PTE table
>> storage and pointers to software PTE values. Convert the generic
>> declarations and their MM, fs, and kernel users together so parameters,
>> return types, callbacks, and local pointers that designate table storage
>> use hw_pte_t *.
>>
>> Include linux/pgtable_types.h from headers that expose the converted
>> interfaces. It continues to provide pgprot_t to vmalloc.h through
>> asm/page.h.
>>
>> Keep software PTE values as pte_t and retain pte_t * for value interfaces.
>>
>> No architecture selects ARCH_HAS_HW_PTE_T at this point, so hw_pte_t
>> remains an alias of pte_t and this changes the interface vocabulary without
>> changing representation or behavior.
>>
>> Most of this mechanical conversion was generated with the Coccinelle script
>> included in the cover letter. The script deliberately ignores pte_t *
>
> Just wondering - should this Coccinelle script that converted all these
> instances be saved inside ./scripts/coccinelle/ for future referene.
Thanks for the suggestion. This script was written for this one-time conversion
and requires manual review to distinguish HW PTE table pointers from SW PTE
pointers. After the conversion, it would not be useful.
(Maybe other arch can use it to do their conversion. But they can always
copy script from the series)
--
Thanks,
Usama
|