From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IQ6yE-0001xH-Gy for qemu-devel@nongnu.org; Tue, 28 Aug 2007 15:43:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IQ6yC-0001ut-NE for qemu-devel@nongnu.org; Tue, 28 Aug 2007 15:43:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IQ6yC-0001ug-H2 for qemu-devel@nongnu.org; Tue, 28 Aug 2007 15:43:24 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IQ6yB-000121-VR for qemu-devel@nongnu.org; Tue, 28 Aug 2007 15:43:24 -0400 From: Paul Brook Subject: Re: [Qemu-devel] Re: PATCH, RFC: Generic DMA framework Date: Tue, 28 Aug 2007 20:43:14 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708282043.17844.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl > On second thought, there is a huge difference between a write access > originating from CPU destined for the device and the device writing to > main memory. The CPU address could be 0xf000 1000, which may translate > to a bus address of 0x1000, as an example. The device could write to > main memory using the same bus address 0x1000, but this time the IOMMU > would map this to for example 0x1234 5000, or without an IOMMU it > would be just 0x1000. While your concern is valid, your example is not. You can't have the same bus address mapping onto both a device and main memory. Your example works if e.g. IO bus address 0x2000 1000 (or worse still 0xf000 1000) maps onto system memory 0x1234 5000. Conceptually you can have a separate IOMMU on every bus-bus or bus/host bridge, with asymmetric mappings depending where the transaction originates. I believe some of the newer POWER machines can do this (x86 hardware with this capability is not generally available). The ARM PCI host bridge allows asymmetric mappings, thought this is simple regions rather than a full IOMMU, and is currently not implemented. Paul