From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2dWU-0007Ie-BL for qemu-devel@nongnu.org; Thu, 03 Jul 2014 05:41:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2dWN-000127-HY for qemu-devel@nongnu.org; Thu, 03 Jul 2014 05:41:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2dWN-00011j-13 for qemu-devel@nongnu.org; Thu, 03 Jul 2014 05:41:39 -0400 Message-ID: <53B52549.2060100@redhat.com> Date: Thu, 03 Jul 2014 11:41:29 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1404375987-29810-1-git-send-email-tamlokveer@gmail.com> <53B517CD.7090209@web.de> In-Reply-To: <53B517CD.7090209@web.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ahci: map memory via device's address space instead of address_space_memory List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka , Le Tan , qemu-devel@nongnu.org Cc: kwolf@redhat.com, peter.maydell@linaro.org, afaerber@suse.de, mst@redhat.com Il 03/07/2014 10:43, Jan Kiszka ha scritto: > On 2014-07-03 10:26, Le Tan wrote: >> In map_page() in hw/ide/ahci.c, replace cpu_physical_memory_map() and >> cpu_physical_memory_unmap() with dma_memory_map() and dma_memory_unmap(), >> because ahci devices should not access memory directly but via their address >> space. Add an AddressSpace parameter to map_page(). In order to call >> map_page(), we should pass the AHCIState.as as the AddressSpace argument. > > BTW, when doing "git grep cpu_physical_memory_map hw", there are some > more cases that should be checked (for x86). I suppose vhost is > incompatible with an IOMMU, but plain virtio should work, same for vmxnet. I think PPC folks explicitly wanted virtio to bypass the IOMMU, probably in order to get vhost running. It seems like a bad idea to me, but who am I... Paolo