aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/p2m.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen/p2m.c')
-rw-r--r--arch/x86/xen/p2m.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 0d4ec35895d4..8b901e8d782d 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -990,10 +990,13 @@ int m2p_remove_override(struct page *page,
990 printk(KERN_WARNING "m2p_remove_override: " 990 printk(KERN_WARNING "m2p_remove_override: "
991 "pfn %lx mfn %lx, failed to modify kernel mappings", 991 "pfn %lx mfn %lx, failed to modify kernel mappings",
992 pfn, mfn); 992 pfn, mfn);
993 put_balloon_scratch_page();
993 return -1; 994 return -1;
994 } 995 }
995 996
996 mcs = xen_mc_entry( 997 xen_mc_batch();
998
999 mcs = __xen_mc_entry(
997 sizeof(struct gnttab_unmap_and_replace)); 1000 sizeof(struct gnttab_unmap_and_replace));
998 unmap_op = mcs.args; 1001 unmap_op = mcs.args;
999 unmap_op->host_addr = kmap_op->host_addr; 1002 unmap_op->host_addr = kmap_op->host_addr;
@@ -1003,12 +1006,11 @@ int m2p_remove_override(struct page *page,
1003 MULTI_grant_table_op(mcs.mc, 1006 MULTI_grant_table_op(mcs.mc,
1004 GNTTABOP_unmap_and_replace, unmap_op, 1); 1007 GNTTABOP_unmap_and_replace, unmap_op, 1);
1005 1008
1006 xen_mc_issue(PARAVIRT_LAZY_MMU);
1007
1008 mcs = __xen_mc_entry(0); 1009 mcs = __xen_mc_entry(0);
1009 MULTI_update_va_mapping(mcs.mc, scratch_page_address, 1010 MULTI_update_va_mapping(mcs.mc, scratch_page_address,
1010 pfn_pte(page_to_pfn(get_balloon_scratch_page()), 1011 pfn_pte(page_to_pfn(scratch_page),
1011 PAGE_KERNEL_RO), 0); 1012 PAGE_KERNEL_RO), 0);
1013
1012 xen_mc_issue(PARAVIRT_LAZY_MMU); 1014 xen_mc_issue(PARAVIRT_LAZY_MMU);
1013 1015
1014 kmap_op->host_addr = 0; 1016 kmap_op->host_addr = 0;