Il 01/05/2013 07:06, David Gibson ha scritto:
>>> + +    /* FIXME: inherit memory region from bus creator */ +
>>> memory_region_init_alias(mr, "iommu-nop", get_system_memory(),
>>> 0, INT64_MAX); +    return mr;
> I don't see the reason for creating a new alias for each PCI
> device. Can't pci_dev->iommu just point directly to
> get_system_memory() in the normal case?
> 
> In addition to creating additional objects, having these aliases
> makes it much les obvious how to tell if two PCI devices share an
> IOMMU address space.  We have to be able to determine that for
> VFIO, since devices which share an address space in the host
> clearly can't be assigned to different address spaces in the
> guest.

Right, the alias that is needed to enable/disable bus-mastering is
created already below, so pci_dev->iommu can be shared (as it is in the
spapr case).

Paolo

Reply via email to