x86: introduce read_sregs() to allow storing to memory directly
authorJan Beulich <jbeulich@suse.com>
Tue, 29 Sep 2020 08:50:27 +0000 (10:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 29 Sep 2020 08:50:27 +0000 (10:50 +0200)
commit32a9ecca23b87db659c19fa5fc23c40309ba68ed
tree739ea8c4c9a25170e86519c2fe34c78aaa4888ad
parent28804c0ce9fde36feec04ad7f57b2683875da8a0
x86: introduce read_sregs() to allow storing to memory directly

When storing all (data) segment registers in one go, prefer writing the
selector values directly to memory (as opposed to read_sreg()).

Also move the single register variant into the regs.h, dropping the
unecessary "volatile" from the asm() (there are no hidden side effects).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/x86_64/traps.c
xen/include/asm-x86/regs.h
xen/include/asm-x86/system.h