Re: [PATCH 3/5] KVM: x86: ioapic: Remove redundant check for Remote IRR in ioapic_set_irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2017-11-05 21:52 GMT+08:00 Nikita Leshenko <nikita.leshchenko@xxxxxxxxxx>:
> 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 <nikita.leshchenko@xxxxxxxxxx>
> Reviewed-by: Liran Alon <liran.alon@xxxxxxxxxx>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>

Reviewed-by: Wanpeng Li <wanpeng.li@xxxxxxxxxxx>

> ---
>  arch/x86/kvm/ioapic.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
> index 5c9231139243..6df150eaaa78 100644
> --- a/arch/x86/kvm/ioapic.c
> +++ b/arch/x86/kvm/ioapic.c
> @@ -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);
> --
> 2.13.3
>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux