From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 4/9] substitute is_allocated_mem with more general is_containing_region Date: Tue, 23 Sep 2008 10:35:24 +0300 Message-ID: <48D89C3C.3080502@redhat.com> References: <1221840506-22996-1-git-send-email-glommer@redhat.com> <1221840506-22996-5-git-send-email-glommer@redhat.com> <48D54214.5080501@redhat.com> <20080922135117.GC3618@poweredge.glommer> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, aliguori@us.ibm.com To: Glauber Costa Return-path: Received: from mx2.redhat.com ([66.187.237.31]:55589 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751196AbYIWHfu (ORCPT ); Tue, 23 Sep 2008 03:35:50 -0400 In-Reply-To: <20080922135117.GC3618@poweredge.glommer> Sender: kvm-owner@vger.kernel.org List-ID: Glauber Costa wrote: > On Sat, Sep 20, 2008 at 11:33:56AM -0700, Avi Kivity wrote: > >> Glauber Costa wrote: >> >>> is_allocated_mem is a function that checks if every relevant aspect of the memory slot >>> match (start and size). Replace it with a more generic function that checks if a memory >>> region is totally contained into another. The former case is also covered. >>> >>> >> I think enabling dirty page tracking requires the slot to match exactly. >> > > The registering function was the only caller for that. As dirty tracking was happening > _inside_ it, so we're not really losing anything here. > > That said, I believe in the future, it will. (would be a logical next step, and start > addressing the problem that Jan raised). Maybe we can keep the function that checks for > exact matching, but another alternative is to pass a phys_addr, and turn dirty tracking on/off > for whatever slot that contains that phys_addr. What do you think? > Exact matching would avoid surprises (catch errors early). -- error compiling committee.c: too many arguments to function