From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: user-allocated memory Date: Tue, 14 Aug 2007 16:01:55 +0300 Message-ID: <46C1A7C3.6050809@qumranet.com> References: <64F9B87B6B770947A9F8391472E032160CBECF40@ehost011-8.exch011.intermedia.net> <46C18616.5000005@de.ibm.com> <46C19778.4090502@qumranet.com> <46C1A5F4.4070006@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Izik Eidus , kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <46C1A5F4.4070006-tA70FqPdS9bQT0dZR+AlfA@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 Carsten Otte wrote: > Avi Kivity wrote: >> kvm only tracks dirty bits if requested by userspace (for live >> migration). Checking the pte is not so easy because the pte contains >> only host addresses, not page addresses (well, we could consult the >> guest page table, but...). > As far as I undstand this code, this function is used to release a > memory page. Hopefully at this time the guest has not set up any page > table entries to this page, because we're releasing the target page. > When the guest migrates the dirty bit from its pte to its struct page > (it always does this at least when removing the pte), we could > indicate this to the hypervisor e.g. via hypercall. This way the > hypervisor would know if the page is dirty or not, without asking the > guest if the guest is paravirtual. > That said, for ept/npt/s390 we have the information anyway without the > need to do above trick, due to the double dirty/reference tracking > approach. That would also work for non-paravirtual guests in that case. We can actually make it work for non-paravirt, non-npt as well; when removing the shadow pte, set the page dirty bit. I forgot that the gfn is immaterial for this. -- 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/