[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] bypassing pci_dma_read() and pci_dma_write() ?
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] bypassing pci_dma_read() and pci_dma_write() ? |
Date: |
Fri, 18 Jan 2013 17:49:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
Il 18/01/2013 17:33, Luigi Rizzo ha scritto:
>> > First, host memory mappings could change (though they rarely do on PC).
>> > The result of address_space_map is not guaranteed to be stable. To
>> > avoid problems with this, however, you could use something like
>> > hw/dataplane/hostmem.c and even avoid address_space_map altogether.
> I'll look into that. Hopefully there is something that i can
> use as a notification that the mapping has changed...
Yes, that's the MemoryListener interface that hw/dataplane/hostmem.c uses.
>> > Second, that pci_dma_*() could have the addresses translated by an
>> > IOMMU. virtio is documented to have "real" physical memory addresses,
>> > but this does not apply to other devices.
> I see. I suppose the ability to have an iommu depends on the
> specific NIC ? I am only planning to use the above shortcut for
> e1000.
It depends on the bus, in this case PCI.
Paolo