From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v7 02/12] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER Date: Mon, 12 Mar 2012 17:50:02 +0200 Message-ID: <4F5E1B2A.6090906@redhat.com> References: <20120312065134.8074.36949.stgit@ubuntu> <20120312065203.8074.52925.stgit@ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: android-virt@lists.cs.columbia.edu, kvm@vger.kernel.org, tech@virtualopensystems.com To: Christoffer Dall Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41290 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841Ab2CLPuS (ORCPT ); Mon, 12 Mar 2012 11:50:18 -0400 In-Reply-To: <20120312065203.8074.52925.stgit@ubuntu> Sender: kvm-owner@vger.kernel.org List-ID: On 03/12/2012 08:52 AM, Christoffer Dall wrote: > From: Marc Zyngier > > In order to avoid compilation failure when KVM is not compiled in, > guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER > and KVM_ARCH_WANT_MMU_NOTIFIER, like it is being done in the rest of > the KVM code. > > Signed-off-by: Marc Zyngier > --- > include/linux/kvm_host.h | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 01275ed..0753472 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -282,7 +282,7 @@ struct kvm { > struct hlist_head irq_ack_notifier_list; > #endif > > -#ifdef KVM_ARCH_WANT_MMU_NOTIFIER > +#if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER) > struct mmu_notifier mmu_notifier; > unsigned long mmu_notifier_seq; > long mmu_notifier_count; > @@ -740,7 +740,7 @@ struct kvm_stats_debugfs_item { > extern struct kvm_stats_debugfs_item debugfs_entries[]; > extern struct dentry *kvm_debugfs_dir; > > -#ifdef KVM_ARCH_WANT_MMU_NOTIFIER > +#if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER) > static inline int mmu_notifier_retry(struct kvm_vcpu *vcpu, unsigned long mmu_seq) > { > if (unlikely(vcpu->kvm->mmu_notifier_count)) > Should not be needed. If you have KVM_ARCH_WANT_MMU_NOTIFIER, it should also select MMU_NOTIFIER if KVM is selected. The following should always hold: !KVM || (KVM_ARCH_WANT_MMU_NOTIFIER && MMU_NOTIFIER) -- error compiling committee.c: too many arguments to function