Lines Matching refs:sdev
827 SMMUDevice *sdev = container_of(mr, SMMUDevice, iommu); in smmuv3_decode_config() local
828 uint32_t sid = smmu_get_sid(sdev); in smmuv3_decode_config()
829 SMMUv3State *s = sdev->smmu; in smmuv3_decode_config()
871 static SMMUTransCfg *smmuv3_get_config(SMMUDevice *sdev, SMMUEventInfo *event) in smmuv3_get_config() argument
873 SMMUv3State *s = sdev->smmu; in smmuv3_get_config()
877 cfg = g_hash_table_lookup(bc->configs, sdev); in smmuv3_get_config()
879 sdev->cfg_cache_hits++; in smmuv3_get_config()
880 trace_smmuv3_config_cache_hit(smmu_get_sid(sdev), in smmuv3_get_config()
881 sdev->cfg_cache_hits, sdev->cfg_cache_misses, in smmuv3_get_config()
882 100 * sdev->cfg_cache_hits / in smmuv3_get_config()
883 (sdev->cfg_cache_hits + sdev->cfg_cache_misses)); in smmuv3_get_config()
885 sdev->cfg_cache_misses++; in smmuv3_get_config()
886 trace_smmuv3_config_cache_miss(smmu_get_sid(sdev), in smmuv3_get_config()
887 sdev->cfg_cache_hits, sdev->cfg_cache_misses, in smmuv3_get_config()
888 100 * sdev->cfg_cache_hits / in smmuv3_get_config()
889 (sdev->cfg_cache_hits + sdev->cfg_cache_misses)); in smmuv3_get_config()
892 if (!smmuv3_decode_config(&sdev->iommu, cfg, event)) { in smmuv3_get_config()
893 g_hash_table_insert(bc->configs, sdev, cfg); in smmuv3_get_config()
902 static void smmuv3_flush_config(SMMUDevice *sdev) in smmuv3_flush_config() argument
904 SMMUv3State *s = sdev->smmu; in smmuv3_flush_config()
907 trace_smmu_config_cache_inv(smmu_get_sid(sdev)); in smmuv3_flush_config()
908 g_hash_table_remove(bc->configs, sdev); in smmuv3_flush_config()
1041 SMMUDevice *sdev = container_of(mr, SMMUDevice, iommu); in smmuv3_translate() local
1042 SMMUv3State *s = sdev->smmu; in smmuv3_translate()
1043 uint32_t sid = smmu_get_sid(sdev); in smmuv3_translate()
1069 cfg = smmuv3_get_config(sdev, &event); in smmuv3_translate()
1147 SMMUDevice *sdev = container_of(mr, SMMUDevice, iommu); in smmuv3_notify_iova() local
1149 SMMUTransCfg *cfg = smmuv3_get_config(sdev, &eventinfo); in smmuv3_notify_iova()
1207 SMMUDevice *sdev; in smmuv3_inv_notifiers_iova() local
1209 QLIST_FOREACH(sdev, &s->devices_with_notifiers, next) { in smmuv3_inv_notifiers_iova()
1210 IOMMUMemoryRegion *mr = &sdev->iommu; in smmuv3_inv_notifiers_iova()
1331 SMMUDevice *sdev = smmu_find_sdev(bs, sid); in smmuv3_cmdq_consume() local
1338 if (!sdev) { in smmuv3_cmdq_consume()
1343 smmuv3_flush_config(sdev); in smmuv3_cmdq_consume()
1370 SMMUDevice *sdev = smmu_find_sdev(bs, sid); in smmuv3_cmdq_consume() local
1377 if (!sdev) { in smmuv3_cmdq_consume()
1382 smmuv3_flush_config(sdev); in smmuv3_cmdq_consume()
2006 SMMUDevice *sdev = container_of(iommu, SMMUDevice, iommu); in smmuv3_notify_flag_changed() local
2007 SMMUv3State *s3 = sdev->smmu; in smmuv3_notify_flag_changed()
2018 "not currently supported", pci_bus_num(sdev->bus), in smmuv3_notify_flag_changed()
2019 PCI_SLOT(sdev->devfn), PCI_FUNC(sdev->devfn)); in smmuv3_notify_flag_changed()
2025 QLIST_INSERT_HEAD(&s->devices_with_notifiers, sdev, next); in smmuv3_notify_flag_changed()
2028 QLIST_REMOVE(sdev, next); in smmuv3_notify_flag_changed()