Re: [PATCH] KVM: LAPIC: Narrow down the timer fastpath to tscdeadline timer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux