OSDN Git Service

KVM: x86: check against irqchip_mode in kvm_set_routing_entry()
authorDavid Hildenbrand <david@redhat.com>
Fri, 7 Apr 2017 08:50:20 +0000 (10:50 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 12 Apr 2017 18:17:13 +0000 (20:17 +0200)
commit8bf463f3ba0eefd2c808fc22c005fc95f1ad48fe
tree8d10704c14e4940f2f51e9dc40050e40174a912f
parent637e3f86faf97a930f1ac4c3f79fd667addae9e8
KVM: x86: check against irqchip_mode in kvm_set_routing_entry()

Let's replace the checks for pic_in_kernel() and ioapic_in_kernel() by
checks against irqchip_mode.

Also make sure that creation of any route is only possible if we have
an lapic in kernel (irqchip_in_kernel()) or if we are currently
inititalizing the irqchip.

This is necessary to switch pic_in_kernel() and ioapic_in_kernel() to
irqchip_mode, too.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/irq_comm.c