|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 13/17] xen/riscv: Implement p2m_entry_from_mfn() and support PBMT configuration
On 7/28/25 11:09 AM, Jan Beulich wrote:
On 28.07.2025 10:52, Oleksii Kurochko wrote:On 7/23/25 11:46 AM, Jan Beulich wrote:I assume that I have in this case to take some pages for an intermediate page table from freelist P2M pool, set an owner domain to NULL (pg->inuse.domain = NULL). Then in this case it isn't clear why pg->list can't be re-used to link several pages for intermediate page table purposes + metadata? Is it because pg->list can be not empty? In this case it isn't clear if I could use a page, which has threaded pages.Actually looks like I was mis-remembering. Pages removed from freelist indeed aren't put on any other list, so the linking fields are available for use. I guess I had x86 shadow code in mind, where the linking fields are further used. Agree, a single pointer will be more then enough. I'm thinking if it is possible to do something with the case if someone will try
to use:
#define page_get_owner(p) (p)->v.inuse.domain
for a page which was allocated for metadata storage. Shouldn't I have a separate
list for such pages and a macro which will check if a page is in this list?
Similar a list which we have for p2m pages in struct p2m_domain:
...
/* Pages used to construct the p2m */
struct page_list_head pages;
...
Of course, such pages are allocated by alloc_domheap_page(d, MEMF_no_owner),
so there is no owner. But if someone will accidentally use this macro for such
pages then it will be an issue as ->domain likely won't be a NULL anymore.
~ Oleksii
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |