From patchwork Tue Jul 3 09:00:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 1149521 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 3BFF8DFF72 for ; Tue, 3 Jul 2012 09:00:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753150Ab2GCJAJ (ORCPT ); Tue, 3 Jul 2012 05:00:09 -0400 Received: from mail-qa0-f46.google.com ([209.85.216.46]:47376 "EHLO mail-qa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751969Ab2GCJAH (ORCPT ); Tue, 3 Jul 2012 05:00:07 -0400 Received: by mail-qa0-f46.google.com with SMTP id b17so2419395qad.19 for ; Tue, 03 Jul 2012 02:00:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=tdHaCo6I/psdnkKdajkDdl02thNk1u9LIoMY3Yo4iwg=; b=LLiirpCEli74cnZh6O0pPKqafEUE51lpkRqnYAxvC7kK0TDLeV87PLPcPBTsFlyq/r 36KAVcwO9oVQe7/vjVNB6vT8xnMDYGz24bKbGUABJd0P9nk6MP23Iu1dm6ha9eaAltEK uExXkgpMtlm/nSzfk/zPJK56nd1Uj19LqrWdQCDE8oQyFjHFceDOkmtI0349il9nQ2S7 Alz729+c18qnrawm1EGtbyz6oP88fNgl5qeGvKOg/GopyFSc+tyMe7jBbFUX1KI3eR+u LE6SQ1sDgNsxzjNkBz0wMZFzGRMrOURVDST1c1N2vwkOaKKYS+E5vy0zuNJZoFqCIaYI UkUA== Received: by 10.224.105.129 with SMTP id t1mr28470171qao.91.1341306007172; Tue, 03 Jul 2012 02:00:07 -0700 (PDT) Received: from [127.0.1.1] (fireball.cs.columbia.edu. [128.59.13.10]) by mx.google.com with ESMTPS id y10sm33530800qan.9.2012.07.03.02.00.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 03 Jul 2012 02:00:06 -0700 (PDT) Subject: [PATCH v9 05/16] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER To: android-virt@lists.cs.columbia.edu, kvm@vger.kernel.org From: Christoffer Dall Cc: tech@virtualopensystems.com Date: Tue, 03 Jul 2012 05:00:05 -0400 Message-ID: <20120703090005.27746.57699.stgit@ubuntu> In-Reply-To: <20120703085841.27746.82730.stgit@ubuntu> References: <20120703085841.27746.82730.stgit@ubuntu> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkxmMcLFCR/y2VYlZ4KJigHW528F/+ktgl9gDTri5TmcMoy0iv0FYX/uWS5hPNONa+tkLJ0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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 Signed-off-by: Christoffer Dall --- include/linux/kvm_host.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 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/include/linux/kvm_host.h b/include/linux/kvm_host.h index b7b3f04..96aa7fb 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -306,7 +306,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; @@ -781,7 +781,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))