summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm/nested.c
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2021-02-10 18:54:36 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-03-15 04:43:24 -0400
commitcc3ed80ae69f454c3d904af9f65394a540099723 (patch)
treee509bb227a46ce0546fd003de867174f44947905 /arch/x86/kvm/svm/nested.c
parentfb0c4a4fee5a35b4e531b57e42231868d1fedb18 (diff)
KVM: nSVM: always use vmcb01 to for vmsave/vmload of guest state
This allows to avoid copying of these fields between vmcb01 and vmcb02 on nested guest entry/exit. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm/nested.c')
-rw-r--r--arch/x86/kvm/svm/nested.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index e6f60eded1c9..35947464ee2a 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -536,7 +536,6 @@ int enter_svm_guest_mode(struct kvm_vcpu *vcpu, u64 vmcb12_gpa,
WARN_ON(svm->vmcb == svm->nested.vmcb02.ptr);
- nested_svm_vmloadsave(svm->vmcb01.ptr, svm->nested.vmcb02.ptr);
nested_load_control_from_vmcb12(svm, &vmcb12->control);
svm_switch_vmcb(svm, &svm->nested.vmcb02);
@@ -726,8 +725,6 @@ int nested_svm_vmexit(struct vcpu_svm *svm)
vmcb12->control.pause_filter_thresh =
svm->vmcb->control.pause_filter_thresh;
- nested_svm_vmloadsave(svm->nested.vmcb02.ptr, svm->vmcb01.ptr);
-
svm_switch_vmcb(svm, &svm->vmcb01);
/*