x86/shadow: suppress "fast fault path" optimization without reserved bits
authorJan Beulich <jbeulich@suse.com>
Fri, 5 Mar 2021 12:29:28 +0000 (13:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Mar 2021 12:29:28 +0000 (13:29 +0100)
commit9318fdf757ec234f0ee6c5cd381326b2f581d065
tree0acb4aa9b041582a123ad49a4512bbb964f38847
parentf40e1c52e4e0a3e084b025ed6b68f1e6ebaea027
x86/shadow: suppress "fast fault path" optimization without reserved bits

When none of the physical address bits in PTEs are reserved, we can't
create any 4k (leaf) PTEs which would trigger reserved bit faults. Hence
the present SHOPT_FAST_FAULT_PATH machinery needs to be suppressed in
this case, which is most easily achieved by never creating any magic
entries.

To compensate a little, eliminate sh_write_p2m_entry_post()'s impact on
such hardware.

While at it, also avoid using an MMIO magic entry when that would
truncate the incoming GFN.

Requested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
xen/arch/x86/mm/shadow/multi.c
xen/arch/x86/mm/shadow/types.h