I hope am not messing something up,...

The Linux AMD IOMMU driver does not seem to be applying DTE settings listed in 
the ALL field correctly.

The relevant code:

  switch (e->type) {

  case IVHD_DEV_ALL:

    DUMP_printk("  DEV_ALL\t\t\t first devid: %02x:%02x.%x"
                " last device %02x:%02x.%x flags: %02x\n",
                PCI_BUS_NUM(iommu->first_device),
                PCI_SLOT(iommu->first_device),
                PCI_FUNC(iommu->first_device),
                PCI_BUS_NUM(iommu->last_device),
                PCI_SLOT(iommu->last_device),
                PCI_FUNC(iommu->last_device),
                         e->flags);

               for (dev_i = iommu->first_device;
                    dev_i <= iommu->last_device; ++dev_i)
                    set_dev_entry_from_acpi(iommu, dev_i,
                                    e->flags, 0);
                    break;

  case IVHD_DEV_SELECT:

Basically, the iommu->last/first_device fields are initialized in another state 
of the driver much later in the code(during PCI initialization); the values 
iommu->first/last_device are used before initialization which breaks the logic 
of this code.

On the other hand, this might be a lame bug as I have not seen any IOMMU using 
the ALL settings but I haven't seen many.

Cheers,
David.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to