]> xenbits.xensource.com Git - xen.git/commit
xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN
authorJulien Grall <julien.grall@arm.com>
Wed, 21 Feb 2018 13:46:27 +0000 (13:46 +0000)
committerJulien Grall <julien.grall@arm.com>
Fri, 6 Apr 2018 16:08:59 +0000 (17:08 +0100)
commitf46b6197344fca91db7e1d7bd6df0c4a2703ed6f
tree38a4ecd8d18769741e9c78170ef389b4d40e93f7
parent115fb8e345b9377b400b9e2e9bca1750362d284b
xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

Most of the users of page_to_mfn and mfn_to_page are either overriding
the macros to make them work with mfn_t or use mfn_x/_mfn because the
rest of the function use mfn_t.

So make page_to_mfn and mfn_to_page return mfn_t by default. The __*
version are now dropped as this patch will convert all the remaining
non-typesafe callers.

Only reasonable clean-ups are done in this patch. The rest will use
_mfn/mfn_x for the time being.

Lastly, domain_page_to_mfn is also converted to use mfn_t given that
most of the callers are now switched to _mfn(domain_page_to_mfn(...)).

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
66 files changed:
xen/arch/arm/domain_build.c
xen/arch/arm/kernel.c
xen/arch/arm/mem_access.c
xen/arch/arm/mm.c
xen/arch/arm/p2m.c
xen/arch/x86/cpu/vpmu.c
xen/arch/x86/domain.c
xen/arch/x86/domain_page.c
xen/arch/x86/hvm/dm.c
xen/arch/x86/hvm/dom0_build.c
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/ioreq.c
xen/arch/x86/hvm/stdvga.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/viridian.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/vvmx.c
xen/arch/x86/mm.c
xen/arch/x86/mm/guest_walk.c
xen/arch/x86/mm/hap/guest_walk.c
xen/arch/x86/mm/hap/hap.c
xen/arch/x86/mm/hap/nested_ept.c
xen/arch/x86/mm/mem_sharing.c
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m-pod.c
xen/arch/x86/mm/p2m.c
xen/arch/x86/mm/paging.c
xen/arch/x86/mm/shadow/private.h
xen/arch/x86/numa.c
xen/arch/x86/physdev.c
xen/arch/x86/pv/callback.c
xen/arch/x86/pv/descriptor-tables.c
xen/arch/x86/pv/dom0_build.c
xen/arch/x86/pv/domain.c
xen/arch/x86/pv/emul-gate-op.c
xen/arch/x86/pv/emul-priv-op.c
xen/arch/x86/pv/grant_table.c
xen/arch/x86/pv/ro-page-fault.c
xen/arch/x86/pv/shim.c
xen/arch/x86/smpboot.c
xen/arch/x86/tboot.c
xen/arch/x86/traps.c
xen/arch/x86/x86_64/mm.c
xen/common/domain.c
xen/common/grant_table.c
xen/common/kimage.c
xen/common/memory.c
xen/common/page_alloc.c
xen/common/tmem.c
xen/common/tmem_xen.c
xen/common/trace.c
xen/common/vmap.c
xen/common/xenoprof.c
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/x86/iommu.c
xen/include/asm-arm/mm.h
xen/include/asm-arm/p2m.h
xen/include/asm-x86/mm.h
xen/include/asm-x86/p2m.h
xen/include/asm-x86/page.h
xen/include/xen/domain_page.h
xen/include/xen/mm.h
xen/include/xen/tmem_xen.h