From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: [PATCH 4/6] kvm-userland.git mmu notifier compat Date: Fri, 25 Jul 2008 16:38:34 +0200 Message-ID: <20080725143834.GD8217@duo.random> References: <20080725142452.GA8217@duo.random> <20080725142639.GB8217@duo.random> <20080725143203.GC8217@duo.random> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from host36-195-149-62.serverdedicati.aruba.it ([62.149.195.36]:56337 "EHLO mx.cpushare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751357AbYGYOig (ORCPT ); Fri, 25 Jul 2008 10:38:36 -0400 Content-Disposition: inline In-Reply-To: <20080725143203.GC8217@duo.random> Sender: kvm-owner@vger.kernel.org List-ID: This patch to kvm-userland.git allows to build the tree on older kernels without mmu notifiers. Unfortunately emulating mmu notifiers with kprobes was feasible only for do_wp_page because it has a special property where calling the spte invalidate before the pte invalidate is ok thanks to the guarantee of that pte being wprotect, not to tell about the start/end functions. So old kernels without mmu notifiers will have to keep the page pinned I'm afraid. So to remove the page pin in future patches in a backwards compatible way, we'll have to go with #ifdef MMU_NOTIFIER in kvm.git code I'm afraid and this should be all that's needed on the kvm-userland side. Adding all page pinning needed by old kernels through hack-module.awk sounds a bit extreme to me, even if it would result in cleaner kvm.git code... anyway I think the below patch will be still needed to build regardless how we decide to handle the future changes. Signed-off-by: Andrea Arcangeli diff --git a/kernel/include-compat/linux/mmu_notifier.h b/kernel/include-compat/linux/mmu_notifier.h new file mode 100644 index 0000000..a6db4ba --- /dev/null +++ b/kernel/include-compat/linux/mmu_notifier.h @@ -0,0 +1,6 @@ +#ifndef _LINUX_MMU_NOTIFIER_H +#define _LINUX_MMU_NOTIFIER_H + +struct mmu_notifier {}; + +#endif