x86/mm: re-arrange get_page_from_l<N>e() vs pv_l1tf_check_l<N>e()
authorJan Beulich <jbeulich@suse.com>
Thu, 30 Aug 2018 09:01:02 +0000 (11:01 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 30 Aug 2018 09:01:02 +0000 (11:01 +0200)
commit3ac0b20bc375cfe78eb01528f2a18ac305eff6ab
tree0d5aa6053b439a96f2f025b21007b626022f3d35
parentaed19fb5370df48527fba82c88c6b7411776283a
x86/mm: re-arrange get_page_from_l<N>e() vs pv_l1tf_check_l<N>e()

Restore symmetry between get_page_from_l<N>e(): pv_l1tf_check_l<N>e() is
now uniformly invoked from outside of them. They're no longer getting
called for non-present PTEs. This way the slightly odd three-way return
value meaning of the higher level ones can also be got rid of.

Leave an assertion in get_page_from_l1e() as the only non-static one of
the four siblings, to ensure that no new unguarded calls go unnoticed.

Introduce local variables holding the page table entries processed, and
use them throughout the loop bodies instead of re-reading them from the
page table several times.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/mm.c
xen/arch/x86/pv/ro-page-fault.c