Messages in this thread | | | Date | Tue, 10 May 2022 16:18:26 +0200 | Subject | Re: [PATCH] KVM: LAPIC: Narrow down the timer fastpath to tscdeadline timer | From | Paolo Bonzini <> |
| |
On 5/10/22 16:15, Sean Christopherson wrote: >> >> -static fastpath_t handle_fastpath_preemption_timer(struct kvm_vcpu *vcpu) >> +static bool __handle_preemption_timer(struct kvm_vcpu *vcpu) >> { >> struct vcpu_vmx *vmx = to_vmx(vcpu); >> >> if (!vmx->req_immediate_exit && >> !unlikely(vmx->loaded_vmcs->hv_timer_soft_disabled)) { >> kvm_lapic_expired_hv_timer(vcpu); >> - return EXIT_FASTPATH_REENTER_GUEST; >> + return true; >> } >> >> + return false; > It's a bit odd for the non-fastpath case, but I'd prefer to return fastpath_t > instead of a bool from the inner helper, e.g. >
Yeah, enum > bool almost always (or negative errno). But I also agree that using the fast path for periodic or oneshot timers is not inherently a bad idea.
Paolo
| |