From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QO2LY-0004Yu-LK for qemu-devel@nongnu.org; Sun, 22 May 2011 02:41:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QO2LX-0004vp-Ph for qemu-devel@nongnu.org; Sun, 22 May 2011 02:41:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QO2LX-0004vk-GP for qemu-devel@nongnu.org; Sun, 22 May 2011 02:41:03 -0400 Message-ID: <4DD8AFF9.5080205@redhat.com> Date: Sun, 22 May 2011 09:40:57 +0300 From: Avi Kivity MIME-Version: 1.0 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v1] Add declarations for hierarchical memory region API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Richard Henderson On 05/20/2011 09:16 PM, Blue Swirl wrote: > On Fri, May 20, 2011 at 5: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. > > Sparc (32/64) systems are also very picky about wrong sized accesses. > I think the buses have lines for access size and the device can (and > they will) signal an error in these cases. Then the bus controller > will raise an NMI. > > I think the easiest way to handle this could be to use overlapping > registrations for specific sizes. Then we could make a default error > generator device, which would just signal NMI/MCE on any access. It > would register for all of the picky area with lowest possible > priority. Other devices would register the small working access areas > with no knowledge about this error generator device. Any correct > access should go to other devices, bad accesses to the error > generator. > > Though this would not be very different from current unassigned access handling. The MemoryRegion way of doing it would be to register the MemoryRegion of the bus with the picky attributes. Any sub-regions will inherit the property. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.