[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99d81fa5-dc37-b22f-be1e-4aa0449e6c26@redhat.com>
Date: Thu, 23 Apr 2020 11:40:24 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: Sean Christopherson <sean.j.christopherson@...el.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Haiwei Li <lihaiwei@...cent.com>
Subject: Re: [PATCH v2 5/5] KVM: VMX: Handle preemption timer fastpath
On 23/04/20 11:01, Wanpeng Li wrote:
> +bool kvm_lapic_expired_hv_timer_fast(struct kvm_vcpu *vcpu)
> +{
> + struct kvm_lapic *apic = vcpu->arch.apic;
> + struct kvm_timer *ktimer = &apic->lapic_timer;
> +
> + if (!apic_lvtt_tscdeadline(apic) ||
> + !ktimer->hv_timer_in_use ||
> + atomic_read(&ktimer->pending))
> + return 0;
> +
> + WARN_ON(swait_active(&vcpu->wq));
> + cancel_hv_timer(apic);
> +
> + ktimer->expired_tscdeadline = ktimer->tscdeadline;
> + kvm_inject_apic_timer_irqs_fast(vcpu);
> +
> + return 1;
> +}
> +EXPORT_SYMBOL_GPL(kvm_lapic_expired_hv_timer_fast);
Please re-evaluate if this is needed (or which parts are needed) after
cleaning up patch 4. Anyway again---this is already better, I don't
like the duplicated code but at least I can understand what's going on.
Paolo
Powered by blists - more mailing lists