Commit 7c29ada
iommu/vt-d: Fix ineffective devTLB invalidation for subdevices
iommu_flush_dev_iotlb() is called to invalidate caches on a device but
only loops over the devices which are fully-attached to the domain. For
sub-devices, this is ineffective and can result in invalid caching
entries left on the device.
Fix the missing invalidation by adding a loop over the subdevices and
ensuring that 'domain->has_iotlb_device' is updated when attaching to
subdevices.
Fixes: 67b8e02 ("iommu/vt-d: Aux-domain specific domain attach/detach")
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/1609949037-25291-4-git-send-email-yi.l.liu@intel.com
Signed-off-by: Will Deacon <will@kernel.org>1 parent 18abda7 commit 7c29ada
1 file changed
Lines changed: 37 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| 722 | + | |
| 723 | + | |
722 | 724 | | |
723 | 725 | | |
724 | 726 | | |
| |||
744 | 746 | | |
745 | 747 | | |
746 | 748 | | |
| 749 | + | |
| 750 | + | |
747 | 751 | | |
748 | 752 | | |
749 | 753 | | |
| |||
1464 | 1468 | | |
1465 | 1469 | | |
1466 | 1470 | | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
| 1471 | + | |
| 1472 | + | |
1475 | 1473 | | |
1476 | 1474 | | |
1477 | 1475 | | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
1478 | 1487 | | |
1479 | 1488 | | |
1480 | 1489 | | |
| |||
1555 | 1564 | | |
1556 | 1565 | | |
1557 | 1566 | | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1558 | 1581 | | |
1559 | 1582 | | |
1560 | 1583 | | |
1561 | | - | |
1562 | 1584 | | |
1563 | 1585 | | |
| 1586 | + | |
1564 | 1587 | | |
1565 | 1588 | | |
1566 | 1589 | | |
1567 | 1590 | | |
1568 | 1591 | | |
1569 | | - | |
1570 | | - | |
1571 | | - | |
| 1592 | + | |
| 1593 | + | |
1572 | 1594 | | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
1577 | 1598 | | |
1578 | 1599 | | |
1579 | 1600 | | |
| |||
0 commit comments