v2 2026-09-03

区分PTE表存储与PTE值类型 · v2

引入hw_pte_t区分PTE表项存储与软件PTE值,调整ptep_get等用法并涉及drm/xen。

原始补丁链接

子 Patch(8)

1/8
mm: introduce hw_pte_t for PTE table storage
[mm: introduce hw_pte_t for PTE table storage] pte_t is used both for software PTE values and for entries stored in a PTE table, so pte_t * does not distinguish a pointer to a software PTE value from
2/8
mm: rename pointers to software PTE values as ptentp
[mm: rename pointers to software PTE values as ptentp] Some interfaces use pte_t * for a software PTE value rather than for an entry stored in a PTE table. These pointers must remain pte_t * when poin
3/8
mm: use hw_pte_t for generic PTE table storage
[mm: use hw_pte_t for generic PTE table storage] Generic page-table interfaces use pte_t * for both pointers to PTE table storage and pointers to software PTE values. Convert the generic declarations
4/8
mm: convert PTE table entries in ptep_get()
[mm: convert PTE table entries in ptep_get()] ptep_get() now accepts a pointer to hw_pte_t storage but must continue to return a software PTE value. Add __pte_from_hw for both generic hw_pte_t definit
5/8
mm: convert PTE table entry to pte
[mm: convert PTE table entry to pte] The non-MMU stub receives hw_pte_t but returns a software PTE value. It has no attached PTE that requires ptep_get(), so convert only the stored entry through __pt
6/8
mm/kasan: use hw_pte_t for the early shadow PTE table
[mm/kasan: use hw_pte_t for the early shadow PTE table] kasan_early_shadow_pte is a complete PTE table rather than a software PTE value. Declare and define its elements as hw_pte_t so the object uses
7/8
drm/i915: use hw_pte_t for PTE range callbacks
[drm/i915: use hw_pte_t for PTE range callbacks] apply_to_page_range() now passes PTE table storage to its callback as hw_pte_t *. Update the i915 remap and selftest callbacks to match the new type.
8/8
xen: use hw_pte_t for PTE range callbacks
[xen: use hw_pte_t for PTE range callbacks] Generic PTE range and remapping helpers now pass pointers to PTE table storage as hw_pte_t *. Update the Xen callbacks to match those interfaces. Keep soft