KVM: Avoid double interrupt injection with vapic
authorAvi Kivity <avi@redhat.com>
Mon, 25 Oct 2010 13:23:55 +0000 (15:23 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 12 Jan 2011 09:23:36 +0000 (11:23 +0200)
commit83bcacb1a548d4d8df532376c981277761622bce
treedde9955df18fee353cd01419b625618b6e58cc23
parent82ca2d108b493f7d916975805668bef2096f1147
KVM: Avoid double interrupt injection with vapic

After an interrupt injection, the PPR changes, and we have to reflect that
into the vapic.  This causes a KVM_REQ_EVENT to be set, which causes the
whole interrupt injection routine to be run again (harmlessly).

Optimize by only setting KVM_REQ_EVENT if the ppr was lowered; otherwise
there is no chance that a new injection is needed.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/lapic.c