Hi Boqun, Matthew:
On 21/11/2024 02:24, Boqun Feng wrote:
So if I understand correctly, what Abdiel needs here is a way to convert
a virtual address to the corresponding page, would it make sense to just
use folio in this case? Abdiel, what's the operation you are going to
call on the page you get?
Yes that's basically it. The goal here is represent those existing struct
page within this rust Page abstraction but at the same time to avoid taking
over its ownership.
Boqun, Alice, should we reconsider Ownable and Owned trait again? :)
Could you use folio in your case? If so, we can provide a simple binding
for folio which should be `AlwaysRefcounted`, and re-investigate how
page should be wrapped.
I'm not sure. Is there a way to get the struct folio from a vmalloc'd
address, e.g vmalloc_to_folio()?
Regards,
Abdiel