Re: [PATCH 0/6] rust: page: Support borrowing `struct page` and physaddr conversion
From: Jason Gunthorpe
Date: Tue Feb 04 2025 - 15:27:08 EST
On Tue, Feb 04, 2025 at 09:05:47PM +0100, David Hildenbrand wrote:
> Fully agreed, this is going into the right direction. Dumping what's mapped
> is a different story. Maybe that dumping logic could simply be written in C
> for the time being?
?
Isn't dumping just a
decode pte -> phys_to_virt() -> for_each_u64(virt) -> printk?
If you can populate the page table in rust you have to be able to dump
it, surely.
Or do you mean trying to decode the leaf entires into some struct page
detail? Does a GPU need to do that? Agree that would be better as some
C function to take in a KVA instead of a struct page and populate a
string with details about that KVA from the struct page.
Jason