summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/vmenter.S
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-02-09 15:10:43 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2021-03-15 11:43:23 +0300
commitfb0c4a4fee5a35b4e531b57e42231868d1fedb18 (patch)
treee0c4a74710a98fa08afa1c178a66c3bd3a710283 /arch/x86/kvm/svm/vmenter.S
parentc8781feaf1b590dd4363b76327088561cbeaa6f5 (diff)
downloadlinux-fb0c4a4fee5a35b4e531b57e42231868d1fedb18.tar.xz
KVM: SVM: move VMLOAD/VMSAVE to C code
Thanks to the new macros that handle exception handling for SVM instructions, it is easier to just do the VMLOAD/VMSAVE in C. This is safe, as shown by the fact that the host reload is already done outside the assembly source. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/vmenter.S')
-rw-r--r--arch/x86/kvm/svm/vmenter.S14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S
index 6feb8c08f45a..343108bf0f8c 100644
--- a/arch/x86/kvm/svm/vmenter.S
+++ b/arch/x86/kvm/svm/vmenter.S
@@ -79,12 +79,6 @@ SYM_FUNC_START(__svm_vcpu_run)
/* Enter guest mode */
sti
-1: vmload %_ASM_AX
- jmp 3f
-2: cmpb $0, kvm_rebooting
- jne 3f
- ud2
- _ASM_EXTABLE(1b, 2b)
3: vmrun %_ASM_AX
jmp 5f
@@ -93,13 +87,7 @@ SYM_FUNC_START(__svm_vcpu_run)
ud2
_ASM_EXTABLE(3b, 4b)
-5: vmsave %_ASM_AX
- jmp 7f
-6: cmpb $0, kvm_rebooting
- jne 7f
- ud2
- _ASM_EXTABLE(5b, 6b)
-7:
+5:
cli
#ifdef CONFIG_RETPOLINE