x86: remove CR reads from exit-to-guest path
authorJan Beulich <jbeulich@suse.com>
Tue, 6 Mar 2018 15:49:36 +0000 (16:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 Mar 2018 15:49:36 +0000 (16:49 +0100)
commit31bf55cb5fe3796cf6a4efbcfc0a9418bb1c783f
tree58579b8c986e383ed037321e9838906e924496f0
parent9d1d31ad9498e6ceb285d5774e34fed5f648c273
x86: remove CR reads from exit-to-guest path

CR3 is - during normal operation - only ever loaded from v->arch.cr3,
so there's no need to read the actual control register. For CR4 we can
generally use the cached value on all synchronous entry end exit paths.
Drop the write_cr3 macro, as the two use sites are probably easier to
follow without its use.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/asm-offsets.c
xen/arch/x86/x86_64/entry.S
xen/include/asm-x86/asm_defns.h