From: Konrad Rzeszutek Wilk Date: Wed, 6 Feb 2013 16:41:57 +0000 (-0500) Subject: Merge branch 'stable/pvh.v7' into linux-next X-Git-Tag: next-20130218~34^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3f49cb37512dcbbf5286afd46de2c0de3e3e7801;p=karo-tx-linux.git Merge branch 'stable/pvh.v7' into linux-next Conflicts: drivers/xen/grant-table.c --- 3f49cb37512dcbbf5286afd46de2c0de3e3e7801 diff --cc drivers/xen/grant-table.c index 34bdb6d84bed,0a714ad60174..6905c257a96e --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@@ -1088,11 -1140,30 +1089,29 @@@ static void gnttab_request_version(void grant_table_version); } + static int xlated_setup_gnttab_pages(int numpages, void **addr) + { + int i, rc; + unsigned long pfns[numpages]; + struct page *pages[numpages]; + + rc = alloc_xenballooned_pages(numpages, pages, 0); + if (rc != 0) { + pr_warn("%s Could not balloon alloc %d pfns rc:%d\n", __func__, + numpages, rc); + return -ENOMEM; + } + for (i = 0; i < numpages; i++) + pfns[i] = page_to_pfn(pages[i]); + + rc = arch_gnttab_map_shared(pfns, numpages, numpages, addr); + return rc; + } + -int gnttab_resume(void) +static int gnttab_setup(void) { - unsigned int max_nr_gframes; - char *kmsg = "Failed to kmalloc pages for pv in hvm grant frames\n"; + unsigned int rc, max_nr_gframes; - gnttab_request_version(); max_nr_gframes = gnttab_max_grant_frames(); if (max_nr_gframes < nr_grant_frames) return -ENOSYS;