[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <80ddc8a2-41c6-4e12-62f9-7acd51cabdb7@redhat.com>
Date: Tue, 10 May 2022 16:18:26 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>,
Wanpeng Li <kernellwp@...il.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>
Subject: Re: [PATCH] KVM: LAPIC: Narrow down the timer fastpath to tscdeadline
timer
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
Powered by blists - more mailing lists