KVM: Optimize searching for highest IRR
Most of the time IRR is empty, so instead of scanning the whole IRR on each VM entry keep a variable that tells us if IRR is not empty. IRR will have to be scanned twice on each IRQ delivery, but this is much more rare than VM entry. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
@@ -12,6 +12,7 @@ struct kvm_lapic {
|
||||
struct kvm_timer lapic_timer;
|
||||
u32 divide_count;
|
||||
struct kvm_vcpu *vcpu;
|
||||
bool irr_pending;
|
||||
struct page *regs_page;
|
||||
void *regs;
|
||||
gpa_t vapic_addr;
|
||||
|
Reference in New Issue
Block a user