Re: [PATCH v1 1/3] KVM: VMX: Consider PID.PIR to determine if vCPU has pending interrupts

From: Paolo Bonzini
Date: Mon Nov 11 2019 - 10:58:37 EST


On 11/11/19 15:59, Joao Martins wrote:
>> Should we check the bitmap only if SN is false?
^^^^^

Of course it should be skipped if SN is false, as you correctly say below.

>> We have a precondition
>> that if SN is clear then non-empty PIR implies ON=1 (modulo the small
>> window in vmx_vcpu_pi_load of course), so that'd be a bit faster.
> Makes sense;
>
> The bitmap check was really meant for SN=1.
>
> Should SN=0 we would be saving ~22-27 cycles as far as I micro-benchmarked a few
> weeks ago. Now that you suggest it, it would be also good for older platforms too.

Or even newer platforms if they don't use VT-d.

Paolo