From patchwork Thu Apr 18 06:29:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mackerras X-Patchwork-Id: 2457521 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 7DBB6DF2E5 for ; Thu, 18 Apr 2013 06:34:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965720Ab3DRGe0 (ORCPT ); Thu, 18 Apr 2013 02:34:26 -0400 Received: from ozlabs.org ([203.10.76.45]:56158 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965691Ab3DRGeV (ORCPT ); Thu, 18 Apr 2013 02:34:21 -0400 Received: by ozlabs.org (Postfix, from userid 1003) id 3A99B2C0265; Thu, 18 Apr 2013 16:34:20 +1000 (EST) Date: Thu, 18 Apr 2013 16:29:26 +1000 From: Paul Mackerras To: Alexander Graf Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Scott Wood Subject: [PATCH v5 0/8] In-kernel XICS interrupt controller emulation Message-ID: <20130418062926.GA25033@drongo> MIME-Version: 1.0 Content-Disposition: inline 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 This is a repost of my patch series implementing in-kernel emulation of the XICS interrupt controller architecture defined in PAPR (Power Architecture Platform Requirements, the document that defines IBM's pSeries platform architecture). This version of the patch series uses the latest device API as posted by Scott Wood, that is, i.e., the version where the core device code provides the file descriptor and ioctl handler. I have structured the series so that the API is added by the last two patches, so as to be able to accommodate any future revisions to the device API with minimal changes. The series is based on Alex Graf's kvm-ppc-queue branch with Scott Wood's recent patch series applied on top, together with the patch below to allow it to build with CONFIG_KVM_MPIC=n. The API defined here uses KVM_CREATE_DEVICE to create the XICS, KVM_DEVICE_SET_ATTR/KVM_DEVICE_GET_ATTR to manipulate the interrupt sources (for initialization and migration), a new KVM_CAP_IRQ_XICS capability to connect vcpus to the XICS, a new identifier KVM_REG_PPC_ICP_STATE for the one-reg interface to get and set per-vcpu state, and the existing KVM_IRQ_LINE ioctl to assert and deassert interrupt sources. This version also cleans up some checkpatch.pl errors and clarifies the lifetime rules for the various objects. There are two checkpatch warnings for long lines, but they are long because they have long strings in them, and if I break the strings over two lines then checkpatch warns about that. 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 1d3888b..bd41eea 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -466,9 +466,11 @@ 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_disconnect_vcpu(vcpu->arch.mpic, vcpu); break; +#endif } kvmppc_core_vcpu_free(vcpu);