[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 07/14] xen: mark grant mapped pages as foreign
On 01/12/2015 10:43 AM, David Vrabel wrote: diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 8d6e97c..9c7dc75 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -679,12 +679,27 @@ EXPORT_SYMBOL_GPL(gnttab_free_auto_xlat_frames); */ int gnttab_alloc_pages(int nr_pages, struct page **pages) { + int i; int ret;ret = alloc_xenballooned_pages(nr_pages, pages, false);if (ret < 0) return ret;+ for (i = 0; i < nr_pages; i++) {+#if BITS_PER_LONG < 64 + struct xen_page_foreign *foreign; + + foreign = kzalloc(sizeof(*foreign), GFP_KERNEL); + if (!foreign) { + gnttab_free_pages(nr_pages, pages); + return -ENOMEM; + } + set_page_set_private(pages[i], (unsigned long)foreign); set_page_private() ? -boris _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |