x86/PV: use get_unsafe() instead of copy_from_unsafe()
authorJan Beulich <jbeulich@suse.com>
Thu, 25 Feb 2021 14:39:09 +0000 (15:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Feb 2021 14:39:09 +0000 (15:39 +0100)
commit972cd4308775f4eb48cbba3cc4efaf39e55c8057
treefbca9818b0e0584fff12a05381bba6b013aa35a0
parente0d42bdbbde39522c5730730f18722e5452b700c
x86/PV: use get_unsafe() instead of copy_from_unsafe()

The former expands to a single (memory accessing) insn, which the latter
does not guarantee (the __builtin_constant_p() based switch() statement
there is just an optimization). Yet we'd prefer to read consistent PTEs
rather than risking a split read racing with an update done elsewhere.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
xen/arch/x86/pv/mm.c
xen/arch/x86/pv/mm.h