Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933914AbcKXQbr (ORCPT ); Thu, 24 Nov 2016 11:31:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49486 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933721AbcKXQbp (ORCPT ); Thu, 24 Nov 2016 11:31:45 -0500 From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Paolo Bonzini Subject: [PATCH 1/6] KVM: x86: do allow kvm irqchip with split irqchip Date: Thu, 24 Nov 2016 17:31:29 +0100 Message-Id: <20161124163134.4630-2-rkrcmar@redhat.com> In-Reply-To: <20161124163134.4630-1-rkrcmar@redhat.com> References: <20161124163134.4630-1-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 24 Nov 2016 16:31:44 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 653 Lines: 23 Split irqchip cannot be created after creating the kvm irqchip, but we forgot to restrict the other way. This is an API change. Signed-off-by: Radim Krčmář --- arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6f9c9ad13f88..dbed51045c37 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3901,7 +3901,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) -- 2.10.2