OpenCloudOS-Kernel/arch/x86/include/asm/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
..
events.h xen: Support 64-bit PV guest receiving NMIs 2013-08-09 10:55:47 -04:00
hypercall.h xen-pciback: notify hypervisor about devices intended to be assigned to guests 2013-03-22 10:20:55 -04:00
hypervisor.h xen: Switch to use hypervisor_cpuid_base() 2013-08-05 06:34:09 -07:00
interface.h xen: arm: implement remap interfaces needed for privcmd mappings. 2012-11-29 14:00:19 +00:00
interface_32.h xen: implement XENMEM_machphys_mapping 2010-11-12 15:00:06 -08:00
interface_64.h xen: implement XENMEM_machphys_mapping 2010-11-12 15:00:06 -08:00
page-coherent.h xen: introduce xen_dma_map/unmap_page and xen_dma_sync_single_for_cpu/device 2013-10-25 10:39:49 +00:00
page.h xen/grant-table: Avoid m2p_override during mapping 2014-01-31 09:48:32 -05:00
pci.h xen/pci: Squash pci_xen_initial_domain and xen_setup_pirqs together. 2011-07-11 13:19:30 -04:00
swiotlb-xen.h xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used. 2012-09-17 12:58:16 -04:00
trace_types.h xen/trace: add multicall tracing 2011-07-18 15:43:26 -07:00