From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH 4/9] substitute is_allocated_mem with more general is_containing_region Date: Mon, 22 Sep 2008 10:51:17 -0300 Message-ID: <20080922135117.GC3618@poweredge.glommer> References: <1221840506-22996-1-git-send-email-glommer@redhat.com> <1221840506-22996-5-git-send-email-glommer@redhat.com> <48D54214.5080501@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, aliguori@us.ibm.com To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:54394 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752471AbYIVN6R (ORCPT ); Mon, 22 Sep 2008 09:58:17 -0400 Content-Disposition: inline In-Reply-To: <48D54214.5080501@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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? > > -- > I have a truly marvellous patch that fixes the bug which this > signature is too narrow to contain. >