lkml.org 
[lkml]   [2020]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/5] KVM: LAPIC: Introduce interrupt delivery fastpath
From
Date
On 23/04/20 11:44, Wanpeng Li wrote:
>>>> Would it help to make the above
>>>>
>>>> if (vcpu != kvm_get_running_vcpu() &&
>>>> !kvm_vcpu_trigger_posted_interrupt(vcpu, false))
>>>> kvm_vcpu_kick(vcpu);
>>>>
>>>> ? If that is enough for the APICv case, it's good enough.
>>>
>>> We will not exit from vmx_vcpu_run to vcpu_enter_guest, so it will not
>>> help, right?
>>
>> Oh indeed---the call to sync_pir_to_irr is in vcpu_enter_guest. You can
>> add it to patch 3 right before "goto cont_run", since AMD does not need it.
>
> Just move kvm_x86_ops.sync_pir_to_irr(vcpu)? How about the set pir/on
> part for APICv and non-APICv part in fast_deliver_interrupt()?

That should be handled by deliver_posted_interrupt with no performance
penalty, if you add "vcpu != kvm_get_running_vcpu()" before it calls
kvm_vcpu_trigger_posted_interrupt.

Paolo

\
 
 \ /
  Last update: 2020-04-23 11:53    [W:0.041 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site