KVM: x86: ioapic: Remove redundant check for Remote IRR in ioapic_set_irq
authorNikita Leshenko <[email protected]>
Sun, 5 Nov 2017 13:52:31 +0000 (15:52 +0200)
committerPaolo Bonzini <[email protected]>
Fri, 17 Nov 2017 12:20:19 +0000 (13:20 +0100)
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]>
arch/x86/kvm/ioapic.c

index 5c92311392437958b1091a8cce00ce33bde4ebac..6df150eaaa78f16ccec0c514cac17efe48727177 100644 (file)
@@ -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);