linux-stable/arch/x86/xen
Zoltan Kiss 08ece5bb23 xen/grant-table: Avoid m2p_override during mapping
The grant mapping API does m2p_override unnecessarily: only gntdev needs it,
for blkback and future netback patches it just cause a lock contention, as
those pages never go to userspace. Therefore this series does the following:
- the original functions were renamed to __gnttab_[un]map_refs, with a new
  parameter m2p_override
- based on m2p_override either they follow the original behaviour, or just set
  the private flag and call set_phys_to_machine
- gnttab_[un]map_refs are now a wrapper to call __gnttab_[un]map_refs with
  m2p_override false
- a new function gnttab_[un]map_refs_userspace provides the old behaviour

It also removes a stray space from page.h and change ret to 0 if
XENFEAT_auto_translated_physmap, as that is the only possible return value
there.

v2:
- move the storing of the old mfn in page->index to gnttab_map_refs
- move the function header update to a separate patch

v3:
- a new approach to retain old behaviour where it needed
- squash the patches into one

v4:
- move out the common bits from m2p* functions, and pass pfn/mfn as parameter
- clear page->private before doing anything with the page, so m2p_find_override
  won't race with this

v5:
- change return value handling in __gnttab_[un]map_refs
- remove a stray space in page.h
- add detail why ret = 0 now at some places

v6:
- don't pass pfn to m2p* functions, just get it locally

Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com>
Suggested-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2014-01-31 09:48:32 -05:00
..
apic.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
debugfs.c debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
debugfs.h debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
enlighten.c xen/pvh: Set X86_CR0_WP and others in CR0 (v2) 2014-01-21 13:26:05 -05:00
grant-table.c xen/pvh: Fix compile issues with xen_pvh_domain() 2014-01-07 09:59:28 -05:00
irq.c xen/pvh: Piggyback on PVHVM for event channels (v2) 2014-01-06 10:44:15 -05:00
Kconfig xen/pvh: Use 'depend' instead of 'select'. 2014-01-10 10:45:35 -05:00
Makefile xen/x86: Implement x86_apic_ops 2012-05-01 14:50:33 -04:00
mmu.c xen/pvh/mmu: Use PV TLB instead of native. 2014-01-06 10:44:07 -05:00
mmu.h xen: make a pile of mmu pvop functions static 2011-05-20 14:25:24 -07:00
multicalls.c xen/multicall: move *idx fields to start of mc_buffer 2011-07-18 15:43:46 -07:00
multicalls.h xen: use this_cpu_xxx replace percpu_xxx funcs 2012-01-24 12:20:24 -05:00
p2m.c xen/grant-table: Avoid m2p_override during mapping 2014-01-31 09:48:32 -05:00
pci-swiotlb-xen.c pci-swiotlb-xen: call pci_request_acs only ifdef CONFIG_PCI 2013-11-08 15:21:44 -05:00
platform-pci-unplug.c xen/pvhvm: Remove the xen_platform_pci int. 2014-01-03 14:54:53 -05:00
setup.c xen/pvh: Update E820 to work with PVH (v2) 2014-01-06 10:44:13 -05:00
smp.c xen/pvh: Set X86_CR0_WP and others in CR0 (v2) 2014-01-21 13:26:05 -05:00
smp.h xen: Clean up apic ipi interface 2013-05-29 09:04:21 -04:00
spinlock.c x86/xen: remove deprecated IRQF_DISABLED 2013-11-06 15:31:01 -05:00
suspend.c Revert "xen PVonHVM: use E820_Reserved area for shared_info" 2013-02-14 21:29:31 -05:00
time.c xen/x86: set VIRQ_TIMER priority to maximum 2014-01-06 10:07:55 -05:00
trace.c xen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set 2011-08-05 09:43:02 -04:00
vdso.h
vga.c xen/vga: add the xen EFI video mode support 2012-09-24 09:28:57 -04:00
xen-asm.h
xen-asm.S xen: correctly check for pending events when restoring irq flags 2012-04-27 16:04:21 -04:00
xen-asm_32.S x86/xen: don't assume %ds is usable in xen_iret for 32-bit PVOPS. 2013-02-13 15:40:30 -05:00
xen-asm_64.S xen: use iret for return from 64b kernel to 32b usermode 2009-12-03 11:14:54 -08:00
xen-head.S xen/pvh: Support ParaVirtualized Hardware extensions (v3). 2014-01-06 10:44:24 -05:00
xen-ops.h xen/pvh: Set X86_CR0_WP and others in CR0 (v2) 2014-01-21 13:26:05 -05:00