From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 4/6] kvm-userland.git mmu notifier compat Date: Tue, 29 Jul 2008 15:49:08 +0300 Message-ID: <488F11C4.5050109@qumranet.com> References: <20080725142452.GA8217@duo.random> <20080725142639.GB8217@duo.random> <20080725143203.GC8217@duo.random> <20080725143834.GD8217@duo.random> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Andrea Arcangeli Return-path: Received: from il.qumranet.com ([212.179.150.194]:10423 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbYG2MtK (ORCPT ); Tue, 29 Jul 2008 08:49:10 -0400 In-Reply-To: <20080725143834.GD8217@duo.random> Sender: kvm-owner@vger.kernel.org List-ID: Andrea Arcangeli wrote: > 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. > > Applied; thanks. I think page pinning can be worked around by pinning all pages on memslot registration (and unpinning on memslot removal); this will slow down virtual machine startup, but is at least simple. -- error compiling committee.c: too many arguments to function