From: Radim Krčmář Date: Fri, 16 Dec 2016 15:10:01 +0000 (+0100) Subject: KVM: x86: don't allow kernel irqchip with split irqchip X-Git-Tag: Ubuntu-5.4-5.4.0-11.14~8369^2~81 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=35e6eaa3df55822d0cb1df3bf08e6cb816737131;p=mirror_ubuntu-focal-kernel.git 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 Reviewed-by: David Hildenbrand Signed-off-by: Radim Krčmář Signed-off-by: Paolo Bonzini --- 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)