From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v8 04/15] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER Date: Mon, 18 Jun 2012 16:08:29 +0300 Message-ID: <4FDF284D.8030804@redhat.com> References: <20120615190553.24590.18391.stgit@ubuntu> <20120615190724.24590.78781.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 To: Christoffer Dall Return-path: Received: from mx1.redhat.com ([209.132.183.28]:45485 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828Ab2FRNIh (ORCPT ); Mon, 18 Jun 2012 09:08:37 -0400 In-Reply-To: <20120615190724.24590.78781.stgit@ubuntu> Sender: kvm-owner@vger.kernel.org List-ID: On 06/15/2012 10:07 PM, 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. > > > -#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; > @@ -780,7 +780,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) > { Why not have Kconfig select CONFIG_MMU_NOTIFIER? -- error compiling committee.c: too many arguments to function