]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commit
xen/mm: Switch map_pages_to_xen to use MFN typesafe
authorJulien Grall <julien.grall@arm.com>
Wed, 21 Feb 2018 13:46:25 +0000 (13:46 +0000)
committerJulien Grall <julien.grall@arm.com>
Fri, 6 Apr 2018 08:43:29 +0000 (09:43 +0100)
commit0b6b51a69f4d07899275665ede529975390759af
tree3a70b8349130d7ed045f6842b8fd5beda666fa2a
parentc748d32597076ecb66a27ed63525fc5f3d5addda
xen/mm: Switch map_pages_to_xen to use MFN typesafe

The current prototype is slightly confusing because it takes a virtual
address and a physical frame (not address!). Switching to MFN will improve
safety and reduce the chance to mistakenly invert the 2 parameters.

Also, take the opportunity to switch (a - b) >> PAGE_SHIFT to
PFN_DOWN(a - b) in the code modified.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
14 files changed:
xen/arch/arm/mm.c
xen/arch/x86/mm.c
xen/arch/x86/setup.c
xen/arch/x86/smpboot.c
xen/arch/x86/tboot.c
xen/arch/x86/x86_64/mm.c
xen/arch/x86/x86_64/mmconfig_64.c
xen/common/efi/boot.c
xen/common/vmap.c
xen/drivers/acpi/apei/erst.c
xen/drivers/acpi/apei/hest.c
xen/drivers/passthrough/vtd/dmar.c
xen/include/asm-arm/mm.h
xen/include/xen/mm.h