From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: kvm guest memory management Date: Wed, 03 Oct 2007 10:03:19 -0500 Message-ID: <4703AF37.7030602@us.ibm.com> References: <46F8C84F.7090605@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A022AE787@pdsmsx411.ccr.corp.intel.com> <46FD1288.9030507@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A022AEA2F@pdsmsx411.ccr.corp.intel.com> <46FD323C.3090905@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A022AEAFE@pdsmsx411.ccr.corp.intel.com> <46FF647E.6080506@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: <46FF647E.6080506-atKUWr5tajBWk0Htik3J/w@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 Avi Kivity wrote: > Dong, Eddie wrote: > >> There are couple reasons that g2h can't server this. >> A VT-d device or EPT/NPT table need to translate from guest physical >> to machine physical address, while g2h uses host mode va as index. >> Other reason is that g2h also include host user space memory & kernel >> memory which guest should never touch. (A bad programmed VT-d device >> may modify the memory listed by VT-d table). >> >> >> > > For EPT, we can't use the host page tables because EPT does not support > the dirty bit. So EPT requires duplication of the page tables anyway. > EPT fill in the dirty bit? To track dirty memory, you would have to read protect portions of the EPT? That seems quite unfortunate... Regards, Anthony Liguori >> Dirty tracking can certainly be serviced even using p2m solely. >> >> >> >>> User-allocated memory will enable the following features: >>> - s390 support >>> - guest swapping >>> - page migration (where a guest is migrated from one NUMA node >>> to another) >>> - in conjunction with a de-duplicating file system, page sharing >>> among guests >>> - inter-guest shared memory (mmap() one file in two or more guests) >>> - easier use of huge pages >>> - more? >>> >>> >>> >> This doesn't conflict with my suggestion though the p2m table then >> need to be dynamically modifed in case swapping happens. >> >> > > The nice thing about using the host page tables is that it's > automatically updated to reflect changes in mapping. Translating a page > (gfn_to_page) becomes a call to get_user_pages(). > > > ------------------------------------------------------------------------- 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/