On 02/10/2010 02:41 PM, Richard Henderson wrote:
On 02/10/2010 11:29 AM, Anthony Liguori wrote:
void *pci_memory_map(PCIDevice *dev, pcibus_t addr, pcibus_t *plen, int
is_write);

void pci_memory_unmap(PCIDevice *dev, void *buf, pcibus_t *plen, int
is_write, pcibus_t access_len);

Are these functions intended to be controllable by the root bus object? It would be awfully nice if we would design in a hook that allowed iommu mapping to be done properly.

Yes, that's the point. For something like virtio, you would have a call chain like:

virtio_memory_map -> pci_memory_map -> sysbus_memory_map[1] -> cpu_memory_map.

Each layer has the ability to do things like implement iommu mapping.

[1] I think it might make sense to have a sysbus layer but I'm not 100% sure yet.

Regards,

Anthony Liguori


r~



Reply via email to