On Thu, 23 Apr 2020 at 18:29, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > On 23/04/20 11:56, Wanpeng Li wrote: > >> 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. > > Except the apic_lvtt_tscdeadline(apic) check, others are duplicated, > > what do you think about apic_lvtt_tscdeadline(apic) check? > > We have to take a look again after you clean up patch 4. My hope is to > reuse the slowpath code as much as possible, by introducing some > optimizations here and there. I found we are not need to move the if (vcpu->arch.apicv_active) from __apic_accept_irq() to a separate function if I understand you correctly. Please see patch v3 3/5. In addition, I observe kvm-unit-tests #UD etc if check need_cancel_enter_guest() after the generic fastpath handler, I didn't dig too much, just move it before the generic fastpath handler for safe in patch v3 2/5. Wanpeng