From patchwork Fri Apr 12 03:42:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mackerras X-Patchwork-Id: 2434011 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 01696DF2A1 for ; Fri, 12 Apr 2013 03:43:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752638Ab3DLDnK (ORCPT ); Thu, 11 Apr 2013 23:43:10 -0400 Received: from ozlabs.org ([203.10.76.45]:53268 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280Ab3DLDnJ (ORCPT ); Thu, 11 Apr 2013 23:43:09 -0400 Received: by ozlabs.org (Postfix, from userid 1003) id AE5CA2C009D; Fri, 12 Apr 2013 13:43:08 +1000 (EST) Date: Fri, 12 Apr 2013 13:42:22 +1000 From: Paul Mackerras To: Alexander Graf Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Scott Wood Subject: Re: [PATCH v4 0/8] In-kernel XICS interrupt controller emulation Message-ID: <20130412034222.GA12164@drongo> References: <20130411055205.GB9042@drongo> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130411055205.GB9042@drongo> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org I wrote: > The series is based on Alex Graf's kvm-ppc-next branch with Scott > Wood's recent patch series applied on top, together with the patch > below to allow it to compile with CONFIG_KVM_MPIC=n. And of course I forgot to include the patch. Here it is. Paul. --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 290a905..5306ca5 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -466,9 +466,13 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) kvmppc_remove_vcpu_debugfs(vcpu); switch (vcpu->arch.irq_type) { +#ifdef CONFIG_KVM_MPIC case KVMPPC_IRQ_MPIC: kvmppc_mpic_put(vcpu->arch.mpic); break; +#endif + default: + break; } kvmppc_core_vcpu_free(vcpu); diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index e325f5d..ca3adf9 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2161,13 +2161,11 @@ out: static int kvm_ioctl_create_device(struct kvm *kvm, struct kvm_create_device *cd) { - bool test = cd->flags & KVM_CREATE_DEVICE_TEST; - switch (cd->type) { #ifdef CONFIG_KVM_MPIC case KVM_DEV_TYPE_FSL_MPIC_20: case KVM_DEV_TYPE_FSL_MPIC_42: { - if (test) + if (cd->flags & KVM_CREATE_DEVICE_TEST) return 0; return kvm_create_mpic(kvm, cd->type);