Skip to content

Commit 9a9e748

Browse files
vittyvkbonzini
authored andcommitted
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: Paolo Bonzini <[email protected]> Signed-off-by: Vitaly Kuznetsov <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 7025098 commit 9a9e748

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

arch/x86/kvm/svm/nested.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ void svm_copy_vmrun_state(struct vmcb_save_area *from_save,
722722
to_save->cpl = 0;
723723
}
724724

725-
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
725+
void svm_copy_vmloadsave_state(struct vmcb *from_vmcb, struct vmcb *to_vmcb)
726726
{
727727
to_vmcb->save.fs = from_vmcb->save.fs;
728728
to_vmcb->save.gs = from_vmcb->save.gs;

arch/x86/kvm/svm/svm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,11 +2147,12 @@ static int vmload_vmsave_interception(struct kvm_vcpu *vcpu, bool vmload)
21472147
ret = kvm_skip_emulated_instruction(vcpu);
21482148

21492149
if (vmload) {
2150-
nested_svm_vmloadsave(vmcb12, svm->vmcb);
2150+
svm_copy_vmloadsave_state(vmcb12, svm->vmcb);
21512151
svm->sysenter_eip_hi = 0;
21522152
svm->sysenter_esp_hi = 0;
2153-
} else
2154-
nested_svm_vmloadsave(svm->vmcb, vmcb12);
2153+
} else {
2154+
svm_copy_vmloadsave_state(svm->vmcb, vmcb12);
2155+
}
21552156

21562157
kvm_vcpu_unmap(vcpu, &map, true);
21572158

arch/x86/kvm/svm/svm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ int svm_allocate_nested(struct vcpu_svm *svm);
466466
int nested_svm_vmrun(struct kvm_vcpu *vcpu);
467467
void svm_copy_vmrun_state(struct vmcb_save_area *from_save,
468468
struct vmcb_save_area *to_save);
469-
void nested_svm_vmloadsave(struct vmcb *from_vmcb, struct vmcb *to_vmcb);
469+
void svm_copy_vmloadsave_state(struct vmcb *from_vmcb, struct vmcb *to_vmcb);
470470
int nested_svm_vmexit(struct vcpu_svm *svm);
471471

472472
static inline int nested_svm_simple_vmexit(struct vcpu_svm *svm, u32 exit_code)

0 commit comments

Comments
 (0)