This is a note to let you know that I've just added the patch titled x86/xen: use vmap() to map grant table pages in PVH guests to the 3.16-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: x86-xen-use-vmap-to-map-grant-table-pages-in-pvh-guests.patch and it can be found in the queue-3.16 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 7d951f3ccb0308c95bf76d5eef9886dea35a7013 Mon Sep 17 00:00:00 2001 From: David Vrabel <david.vrabel@xxxxxxxxxx> Date: Tue, 5 Aug 2014 11:49:19 +0100 Subject: x86/xen: use vmap() to map grant table pages in PVH guests From: David Vrabel <david.vrabel@xxxxxxxxxx> commit 7d951f3ccb0308c95bf76d5eef9886dea35a7013 upstream. Commit b7dd0e350e0b (x86/xen: safely map and unmap grant frames when in atomic context) causes PVH guests to crash in arch_gnttab_map_shared() when they attempted to map the pages for the grant table. This use of a PV-specific function during the PVH grant table setup is non-obvious and not needed. The standard vmap() function does the right thing. Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx> Reported-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> Tested-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/x86/xen/grant-table.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/arch/x86/xen/grant-table.c +++ b/arch/x86/xen/grant-table.c @@ -168,6 +168,7 @@ static int __init xlated_setup_gnttab_pa { struct page **pages; xen_pfn_t *pfns; + void *vaddr; int rc; unsigned int i; unsigned long nr_grant_frames = gnttab_max_grant_frames(); @@ -193,21 +194,20 @@ static int __init xlated_setup_gnttab_pa for (i = 0; i < nr_grant_frames; i++) pfns[i] = page_to_pfn(pages[i]); - rc = arch_gnttab_map_shared(pfns, nr_grant_frames, nr_grant_frames, - &xen_auto_xlat_grant_frames.vaddr); - - if (rc) { + vaddr = vmap(pages, nr_grant_frames, 0, PAGE_KERNEL); + if (!vaddr) { pr_warn("%s Couldn't map %ld pfns rc:%d\n", __func__, nr_grant_frames, rc); free_xenballooned_pages(nr_grant_frames, pages); kfree(pages); kfree(pfns); - return rc; + return -ENOMEM; } kfree(pages); xen_auto_xlat_grant_frames.pfn = pfns; xen_auto_xlat_grant_frames.count = nr_grant_frames; + xen_auto_xlat_grant_frames.vaddr = vaddr; return 0; } Patches currently in stable-queue which might be from david.vrabel@xxxxxxxxxx are queue-3.16/x86-xen-use-vmap-to-map-grant-table-pages-in-pvh-guests.patch queue-3.16/xen-events-fifo-ensure-all-bitops-are-properly-aligned-even-on-x86.patch queue-3.16/x86-xen-resume-timer-irqs-early.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html