]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: improve split between svm_prepare_guest_switch and sev_es_prepare_guest_switch
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 25 Jan 2022 16:11:30 +0000 (11:11 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Feb 2022 18:47:12 +0000 (13:47 -0500)
commit6abf7f2c942ac0ed22a4f4cc1d9f5b58355ab221
tree734f0769aa6c4eb1a8f6cce0c64b4804c0b9ff4d
parent5a28774faa7cc98d8a9fc59ef1aac4e4a187af4b
KVM: SVM: improve split between svm_prepare_guest_switch and sev_es_prepare_guest_switch

KVM performs the VMSAVE to the host save area for both regular and SEV-ES
guests, so hoist it up to svm_prepare_guest_switch.  And because
sev_es_prepare_guest_switch does not really need to know the details
of struct svm_cpu_data *, just pass it the pointer to the host save area
inside the HSAVE page.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/svm/svm.h