x86/mm: merge ptwr and mmio_ro page fault handlers
authorWei Liu <wei.liu2@citrix.com>
Fri, 1 Sep 2017 14:35:39 +0000 (15:35 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 1 Sep 2017 16:43:06 +0000 (17:43 +0100)
commitc68a4ca4d26a1963d67a1d9a7c029c0207c10d3a
treefa6bd01a4456512cb51cc0bc149672b8c95cc47d
parent977c63de3dc54624f42420041d00a7340a9da0dc
x86/mm: merge ptwr and mmio_ro page fault handlers

Provide a unified entry to avoid going through pte look-up, decode and
emulation cycle more than necessary. The path taken is determined by
the faulting address.

Note that the order of checks is changed in the new function, but the
order of the checks is performed shouldn't matter.

The sole caller is changed to use the new function.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c
xen/arch/x86/traps.c
xen/include/asm-x86/mm.h