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