[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/mm: Unmap page for direct mapped domain on decrease reservation
>>> On 27.10.15 at 12:33, <julien.grall@xxxxxxxxxx> wrote: > Direct mapped domain needs to retrieve the exact same underlying > physical page when the region is re-populated. > > Currently, when the memory reservation for this domain is decreased, the > request is just ignored and the page stayed mapped in the P2M. However, > this make more difficult to spot issue when the domain has not yet mapped > foreign page but trying to access the region. > > What we really care for direct mapped domain is to not give back the > page to the allocator. So we can re-enable to direct mapped when the guest > memory region is re-populated. > > The rest of the process to remove a page can be safely done. This > also ensures us to stay close to the normal domain memory handling. > > At the same time, drop the trailing whitespaces around the code > modified. > > Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Looks good, just one minor comment (which could be addressed upon commit): > --- a/xen/common/memory.c > +++ b/xen/common/memory.c > @@ -257,8 +257,16 @@ int guest_remove_page(struct domain *d, unsigned long > gmfn) > > if ( test_and_clear_bit(_PGT_pinned, &page->u.inuse.type_info) ) > put_page_and_type(page); > - > - if ( test_and_clear_bit(_PGC_allocated, &page->count_info) ) > + > + /* > + * With the lack for iommu on some ARM platform, domain with DMA-capable I think it's "lack of", and I also wonder whether calling out ARM here is really meaningful. > + * device must retrieve the same pfn when the hypercall populate_physmap > + * is called. > + * > + * For this purpose, the page is kept allocated. ..., to match populate_physmap() behavior. (or some such) Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |