Skip to content

Commit 2876624

Browse files
committed
KVM: x86: Rename reexecute_instruction()=>kvm_unprotect_and_retry_on_failure()
Rename reexecute_instruction() to kvm_unprotect_and_retry_on_failure() to make the intent and purpose of the helper much more obvious. No functional change intended. Reviewed-by: Yuan Yao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 4df6856 commit 2876624

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

arch/x86/kvm/x86.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8861,8 +8861,9 @@ static int handle_emulation_failure(struct kvm_vcpu *vcpu, int emulation_type)
88618861
return 1;
88628862
}
88638863

8864-
static bool reexecute_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
8865-
int emulation_type)
8864+
static bool kvm_unprotect_and_retry_on_failure(struct kvm_vcpu *vcpu,
8865+
gpa_t cr2_or_gpa,
8866+
int emulation_type)
88668867
{
88678868
if (!(emulation_type & EMULTYPE_ALLOW_RETRY_PF))
88688869
return false;
@@ -9129,8 +9130,8 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
91299130
kvm_queue_exception(vcpu, UD_VECTOR);
91309131
return 1;
91319132
}
9132-
if (reexecute_instruction(vcpu, cr2_or_gpa,
9133-
emulation_type))
9133+
if (kvm_unprotect_and_retry_on_failure(vcpu, cr2_or_gpa,
9134+
emulation_type))
91349135
return 1;
91359136

91369137
if (ctxt->have_exception &&
@@ -9216,7 +9217,8 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu, gpa_t cr2_or_gpa,
92169217
return 1;
92179218

92189219
if (r == EMULATION_FAILED) {
9219-
if (reexecute_instruction(vcpu, cr2_or_gpa, emulation_type))
9220+
if (kvm_unprotect_and_retry_on_failure(vcpu, cr2_or_gpa,
9221+
emulation_type))
92209222
return 1;
92219223

92229224
return handle_emulation_failure(vcpu, emulation_type);

0 commit comments

Comments
 (0)