[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 5/8] xen/arm: Add additional reference to owner domain when the owner is allocated
On 12/05/2022 10:11, Penny Zheng wrote: Where do you check that the range [smfn, smfn + nr_pages] is actual RAM? If there are none, then you should use mfn_valid() for each mfn to ensure there will be a struct page for it.@@ -827,6 +858,37 @@ static int __init allocate_shared_memory(struct domain *d, } }+ /*+ * Get the right amount of references per page, which is the number of + * borrow domains. + */ + ret = acquire_nr_borrower_domain(d, pbase, psize, &nr_borrowers); + if ( ret ) + return ret; + + /* + * Instead of let borrower domain get a page ref, we add as many + * additional reference as the number of borrowers when the owner + * is allocated, since there is a chance that owner is created + * after borrower. + */ + page = mfn_to_page(smfn); Cheers, -- Julien Grall
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |