Commit 35e6eaa3 authored by Radim Krčmář's avatar Radim Krčmář

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: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent a121103c
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment