From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC v1] Add declarations for hierarchical memory region API Date: Sun, 22 May 2011 18:56:41 +0300 Message-ID: <4DD93239.8050109@redhat.com> References: <1305814352-15044-1-git-send-email-avi@redhat.com> <1305814352-15044-2-git-send-email-avi@redhat.com> <4DD580FD.2030409@codemonkey.ws> <4DD6331E.8000105@redhat.com> <4DD67563.9080803@twiddle.net> <4DD67B2F.5080907@codemonkey.ws> <4DD8AF53.7020206@redhat.com> <4DD92F40.8010405@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Richard Henderson To: Anthony Liguori Return-path: In-Reply-To: <4DD92F40.8010405@codemonkey.ws> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org On 05/22/2011 06:44 PM, Anthony Liguori wrote: > >>> >>> At any rate, I'm fairly sure it doesn't belong in the MemoryRegion >>> structure. >>> >> >> Since it isn't a global property, where does it belong? > > > The chipset should have an intercept in the dispatch path that > enforces this (this assumes hierarchical dispatch). So instead of region->ops->valid.*, region->ops->intercept()? btw, that still doesn't require hierarchical dispatch. If intercepts only check if the access is valid, it can still be flattened. Hierarchical dispatch means that chipset callbacks get to choose which subregion callbacks are called, which isn't the case here. If it were, it would be impossible to figure out the kvm slot layout. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.