KVM: x86: simplify conditions with split/kernel irqchip
authorRadim Krčmář <rkrcmar@redhat.com>
Fri, 16 Dec 2016 15:10:06 +0000 (16:10 +0100)
committerRadim Krčmář <rkrcmar@redhat.com>
Mon, 9 Jan 2017 13:45:57 +0000 (14:45 +0100)
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/irq_comm.c
arch/x86/kvm/x86.c

index 2639b8d3dce25088f8a07a3cd2e8337839fde8ac..b96d3893f121c77a2bd587fbcace626298075de6 100644 (file)
@@ -400,7 +400,7 @@ int kvm_setup_empty_irq_routing(struct kvm *kvm)
 
 void kvm_arch_post_irq_routing_update(struct kvm *kvm)
 {
-       if (ioapic_in_kernel(kvm) || !irqchip_in_kernel(kvm))
+       if (!irqchip_split(kvm))
                return;
        kvm_make_scan_ioapic_request(kvm);
 }
index 05ac71a01f9983385efaf3912e581ade0182f6d5..a356d8e12c2fb40feb46873a80d33f64952b749f 100644 (file)
@@ -4027,7 +4027,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
                }
 
                r = -ENXIO;
-               if (!irqchip_in_kernel(kvm) || irqchip_split(kvm))
+               if (!irqchip_kernel(kvm))
                        goto get_irqchip_out;
                r = kvm_vm_ioctl_get_irqchip(kvm, chip);
                if (r)
@@ -4051,7 +4051,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
                }
 
                r = -ENXIO;
-               if (!irqchip_in_kernel(kvm) || irqchip_split(kvm))
+               if (!irqchip_kernel(kvm))
                        goto set_irqchip_out;
                r = kvm_vm_ioctl_set_irqchip(kvm, chip);
                if (r)