SVM: introduce a VM entry helper
authorJan Beulich <jbeulich@suse.com>
Mon, 7 May 2018 07:12:16 +0000 (09:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 7 May 2018 07:12:16 +0000 (09:12 +0200)
commit3abe241190af31760c506a9f32bf25e958ea060c
tree416792f3321d2d5597c9678fb1670cc5cfbba5fb
parentcb6ff207f7e0bbfe2d9ab3cb1a0866962cf17169
SVM: introduce a VM entry helper

Neither the register values copying nor the trace entry generation need
doing in assembly. The VMLOAD invocation can also be further deferred
(and centralized). Therefore replace the svm_asid_handle_vmrun()
invocation with one of the new helper.

Similarly move the VM exit side register value copying into
svm_vmexit_handler().

Now that we always make it out to guest context after VMLOAD,
svm_sync_vmcb() no longer overrides vmcb_needs_vmsave, making
svm_vmexit_handler() setting the field early unnecessary.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/x86/hvm/svm/entry.S
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/x86_64/asm-offsets.c
xen/include/asm-x86/hvm/svm/asid.h