Skip to content

Commit

Permalink
KVM: x86: ioapic: Remove redundant check for Remote IRR in ioapic_set…
Browse files Browse the repository at this point in the history
…_irq

Remote IRR for level-triggered interrupts was previously checked in
ioapic_set_irq, but since we now have a check in ioapic_service we
can remove the redundant check from ioapic_set_irq.

This commit doesn't change semantics.

Signed-off-by: Nikita Leshenko <[email protected]>
Reviewed-by: Liran Alon <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Reviewed-by: Wanpeng Li <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
  • Loading branch information
Nikita Leshenko authored and bonzini committed Nov 17, 2017
1 parent da3fe7b commit 7d22536
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions arch/x86/kvm/ioapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ static int ioapic_set_irq(struct kvm_ioapic *ioapic, unsigned int irq,

old_irr = ioapic->irr;
ioapic->irr |= mask;
if (edge)
if (edge) {
ioapic->irr_delivered &= ~mask;
if ((edge && old_irr == ioapic->irr) ||
(!edge && entry.fields.remote_irr)) {
ret = 0;
goto out;
if (old_irr == ioapic->irr) {
ret = 0;
goto out;
}
}

ret = ioapic_service(ioapic, irq, line_status);
Expand Down

0 comments on commit 7d22536

Please sign in to comment.