On Fri, May 09, 2025 at 06:18:01PM +0800, Chao Gao wrote: > > int tdx_guest_keyid_alloc(void); > > u32 tdx_get_nr_guest_keyids(void); > > void tdx_guest_keyid_free(unsigned int keyid); > >@@ -197,6 +202,9 @@ u64 tdh_mem_page_remove(struct tdx_td *td, u64 gpa, u64 level, u64 *ext_err1, u6 > > u64 tdh_phymem_cache_wb(bool resume); > > u64 tdh_phymem_page_wbinvd_tdr(struct tdx_td *td); > > u64 tdh_phymem_page_wbinvd_hkid(u64 hkid, struct page *page); > >+u64 tdh_phymem_pamt_add(unsigned long hpa, struct list_head *pamt_pages); > >+u64 tdh_phymem_pamt_remove(unsigned long hpa, struct list_head *pamt_pages); > > When these SEAMCALL wrappers were added, Dave requested that a struct page > be passed in instead of an HPA [*]. Does this apply to > tdh_phymem_pamt_add/remove()? > > [*]: https://lore.kernel.org/kvm/30d0cef5-82d5-4325-b149-0e99833b8785@xxxxxxxxx/ hpa here points to a 2M region that pamt_pages covers. We don't have struct page that represents it. Passing 4k struct page would be misleading IMO. -- Kiryl Shutsemau / Kirill A. Shutemov