From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC 7/8]KVM: swap out guest pages Date: Mon, 23 Jul 2007 14:32:20 +0300 Message-ID: <46A491C4.8010302@qumranet.com> References: <1185173505.2645.71.camel@sli10-conroe.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , lkml To: Shaohua Li Return-path: In-Reply-To: <1185173505.2645.71.camel-yAZKuqJtXNMXR+D7ky4Foa2pdiUAq4bhAL8bYrjMMd8@public.gmane.org> 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 Shaohua Li wrote: > Make KVM guest pages be allocated dynamically and able to be swaped out. > > One issue: all inodes returned from anon_inode_getfd are shared, > if one module changes field of the inode, other moduels might break. > Should we introduce a new API to not share inode? > > Signed-off-by: Shaohua Li > --- > drivers/kvm/kvm.h | 8 + > drivers/kvm/kvm_main.c | 220 +++++++++++++++++++++++++++++++++++++++++++++---- > 2 files changed, 211 insertions(+), 17 deletions(-) > > + > + /* > + * We just zap vcpu 0's page table. For a SMP guest, we should zap all > + * vcpus'. It's better shadow page table is per-vm. > + */ > + if (PagePrivate(page)) > + kvm_mmu_zap_pagetbl(&kvm->vcpus[0], page->index); > + > You're not removing any shadows of the page, in case that page is a guest page table. But I don't see anything wrong with it -- the page won't change while it's in swap. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/