From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API Date: Sun, 22 May 2011 10:46:03 -0500 Message-ID: <4DD92FBB.7030700@codemonkey.ws> 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> <4DD67D50.30706@twiddle.net> <4DD67EB8.8050602@codemonkey.ws> <4DD8AF8C.5030305@redhat.com> 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: Avi Kivity Return-path: Received: from mail-gy0-f174.google.com ([209.85.160.174]:47677 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982Ab1EVPqG (ORCPT ); Sun, 22 May 2011 11:46:06 -0400 Received: by gyd10 with SMTP id 10so1820727gyd.19 for ; Sun, 22 May 2011 08:46:05 -0700 (PDT) In-Reply-To: <4DD8AF8C.5030305@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/22/2011 01:39 AM, Avi Kivity wrote: > On 05/20/2011 05:46 PM, Anthony Liguori wrote: >> On 05/20/2011 09:40 AM, Richard Henderson wrote: >>> On 05/20/2011 07:31 AM, Anthony Liguori wrote: >>>> But is this a characteristic of devices or is this a characteristic >>>> of the chipset/CPU? >>> >>> Chipset. >> >> So if the chipset only allows accesses that are 64-bit, then you'll >> want to have hierarchical dispatch filter non 64-bit accesses and >> raise an MCE appropriately. >> >> So you don't need anything in MemoryRegion, you need code in the >> dispatch path. > > MemoryRegion *is* the dispatch path. Only done declaratively so we can > flatten it whenever it changes. We don't want dispatch to be 100% declarative. That's what will cause the API to get horrendously ugly. An example is PCI-bus level endianness conversion. I also believe the Sparc IOMMU has an xor engine. You could add a 'bool swap_endian' and an 'uint32_t xor_mask' in MemoryRegion but now you're adding a ton of platform specific knowledge to what should be an independent layer. Regards, Anthony Liguori >