From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: [PATCH] kvm-userland swapping compat Date: Mon, 21 Jan 2008 13:42:58 +0100 Message-ID: <20080121124258.GH6970@v2.random> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is the kvm-userland patch needed to compile kvm.git as an external module on a kernel w/ MMU_NOTIFIER=n with the kvm swapping patch applied to kvm.git. Signed-off-by: Andrea Arcangeli diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 67b9cc4..8a65fc6 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -17,6 +17,31 @@ #include #include +#ifndef CONFIG_MMU_NOTIFIER +struct mmu_notifier; + +struct mmu_notifier_ops { + void (*release)(struct mmu_notifier *mn, + struct mm_struct *mm); + void (*age_page)(struct mmu_notifier *mn, + struct mm_struct *mm, + unsigned long address); + void (*invalidate_page)(struct mmu_notifier *mn, + struct mm_struct *mm, + unsigned long address); + void (*invalidate_range)(struct mmu_notifier *mn, + struct mm_struct *mm, + unsigned long start, unsigned long end); +}; + +struct mmu_notifier { + const struct mmu_notifier_ops *ops; +}; +#define mmu_notifier_register(mn, mm) do {} while(0) +#define mmu_notifier_unregister(mn, mm) do {} while (0) +#define mmu_notifier_release(mm) do {} while (0) +#endif + /* * 2.6.16 does not have GFP_NOWAIT */ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/