From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2dx7-0000fB-Pq for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:09:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2dwx-0000st-Io for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:09:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2dwx-0000sm-At for qemu-devel@nongnu.org; Thu, 03 Jul 2014 06:09:07 -0400 Date: Thu, 3 Jul 2014 13:11:08 +0300 From: "Michael S. Tsirkin" Message-ID: <20140703101108.GB24859@redhat.com> References: <1404375987-29810-1-git-send-email-tamlokveer@gmail.com> <53B517CD.7090209@web.de> <53B52549.2060100@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53B52549.2060100@redhat.com> 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: Paolo Bonzini Cc: kwolf@redhat.com, peter.maydell@linaro.org, Le Tan , qemu-devel@nongnu.org, Alex Williamson , Jan Kiszka , afaerber@suse.de On Thu, Jul 03, 2014 at 11:41:29AM +0200, Paolo Bonzini wrote: > 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 The argument went like this: IOMMU slows things down. People might want to run a VM where nested virt is *possible* so IOMMU has to be enabled but still get fast IO for the rest of the guest. -- MST