Commit 9a9e7481 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Paolo Bonzini

KVM: nSVM: Rename nested_svm_vmloadsave() to svm_copy_vmloadsave_state()

To match svm_copy_vmrun_state(), rename nested_svm_vmloadsave() to
svm_copy_vmloadsave_state().

Opportunistically add missing braces to 'else' branch in
vmload_vmsave_interception().

No functional change intended.
Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210716144104.465269-1-vkuznets@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7025098a
...@@ -722,7 +722,7 @@ void svm_copy_vmrun_state(struct vmcb_save_area *from_save, ...@@ -722,7 +722,7 @@ void svm_copy_vmrun_state(struct vmcb_save_area *from_save,
to_save->cpl = 0; to_save->cpl = 0;
} }
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb) void svm_copy_vmloadsave_state(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
{ {
to_vmcb->save.fs = from_vmcb->save.fs; to_vmcb->save.fs = from_vmcb->save.fs;
to_vmcb->save.gs = from_vmcb->save.gs; to_vmcb->save.gs = from_vmcb->save.gs;
......
...@@ -2147,11 +2147,12 @@ static int vmload_vmsave_interception(struct kvm_vcpu *vcpu, bool vmload) ...@@ -2147,11 +2147,12 @@ static int vmload_vmsave_interception(struct kvm_vcpu *vcpu, bool vmload)
ret = kvm_skip_emulated_instruction(vcpu); ret = kvm_skip_emulated_instruction(vcpu);
if (vmload) { if (vmload) {
nested_svm_vmloadsave(vmcb12, svm->vmcb); svm_copy_vmloadsave_state(vmcb12, svm->vmcb);
svm->sysenter_eip_hi = 0; svm->sysenter_eip_hi = 0;
svm->sysenter_esp_hi = 0; svm->sysenter_esp_hi = 0;
} else } else {
nested_svm_vmloadsave(svm->vmcb, vmcb12); svm_copy_vmloadsave_state(svm->vmcb, vmcb12);
}
kvm_vcpu_unmap(vcpu, &map, true); kvm_vcpu_unmap(vcpu, &map, true);
......
...@@ -466,7 +466,7 @@ int svm_allocate_nested(struct vcpu_svm *svm); ...@@ -466,7 +466,7 @@ int svm_allocate_nested(struct vcpu_svm *svm);
int nested_svm_vmrun(struct kvm_vcpu *vcpu); int nested_svm_vmrun(struct kvm_vcpu *vcpu);
void svm_copy_vmrun_state(struct vmcb_save_area *from_save, void svm_copy_vmrun_state(struct vmcb_save_area *from_save,
struct vmcb_save_area *to_save); struct vmcb_save_area *to_save);
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb); void svm_copy_vmloadsave_state(struct vmcb *from_vmcb, struct vmcb *to_vmcb);
int nested_svm_vmexit(struct vcpu_svm *svm); int nested_svm_vmexit(struct vcpu_svm *svm);
static inline int nested_svm_simple_vmexit(struct vcpu_svm *svm, u32 exit_code) static inline int nested_svm_simple_vmexit(struct vcpu_svm *svm, u32 exit_code)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment