SVM: avoid VMSAVE in ctxt-switch-to
authorJan Beulich <jbeulich@suse.com>
Tue, 20 Oct 2020 06:54:59 +0000 (08:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Oct 2020 06:54:59 +0000 (08:54 +0200)
commita7f0831e58bf4681d710e9a029644b6fa07b7cb0
tree4e205ac1fc2adf31a3c020acbaf56d0307fa30f5
parentde6d188a519f9e3b7a1acc7784adf4c243865f9a
SVM: avoid VMSAVE in ctxt-switch-to

Of the state saved by the insn and reloaded by the corresponding VMLOAD
- TR and syscall state are invariant while having Xen's state loaded,
- sysenter is unused altogether by Xen,
- FS, GS, and LDTR are not used by Xen and get suitably set in PV
  context switch code.
Note that state is suitably populated in _svm_cpu_up(); a minimal
respective assertion gets added.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/svm/svm.c
xen/include/asm-x86/desc.h