summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorRadim Krčmář2016-12-16 16:10:01 +0100
committerRadim Krčmář2017-01-09 14:38:19 +0100
commit35e6eaa3df55822d0cb1df3bf08e6cb816737131 (patch)
tree5df885fa18a409a7d3d80826594236cfc1bd5ff7 /arch/x86/kvm/x86.c
parentLinux 4.10-rc3 (diff)
downloadkernel-qcow2-linux-35e6eaa3df55822d0cb1df3bf08e6cb816737131.tar.gz
kernel-qcow2-linux-35e6eaa3df55822d0cb1df3bf08e6cb816737131.tar.xz
kernel-qcow2-linux-35e6eaa3df55822d0cb1df3bf08e6cb816737131.zip
KVM: x86: don't allow kernel irqchip with split irqchip
Split irqchip cannot be created after creating the kernel irqchip, but we forgot to restrict the other way. This is an API change. 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>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2f22810a7e0c..c72a8d00a1c0 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3961,7 +3961,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
mutex_lock(&kvm->lock);
r = -EEXIST;
- if (kvm->arch.vpic)
+ if (irqchip_in_kernel(kvm))
goto create_irqchip_unlock;
r = -EINVAL;
if (kvm->created_vcpus)