Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdpa/virtio: re-implement iommu domain #76

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

Ch3n60x
Copy link
Collaborator

@Ch3n60x Ch3n60x commented Apr 24, 2024

This commit changes iommu domain list to an array and adds a new lock
array to protect the iommu domain. This re-implementation is for
improving the thread-safety of iommu domain.

@@ -2220,6 +2224,7 @@ virtio_vdpa_dev_probe(struct rte_pci_driver *pci_drv __rte_unused,
}

priv->iommu_domain = iommu_domain;
pthread_mutex_init(&priv->domain_lock, NULL);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if 2 vf use same iommu domain, but they will use different lock to protect same iommu domain?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, current code is wrong

@Ch3n60x Ch3n60x changed the title vdpa/virtio: move iommu domain lock to driver private structure vdpa/virtio: re-implement iommu domain Apr 25, 2024
This commit changes iommu domain list to an array and adds a new lock
array to protect the iommu domain. This re-implementation is for
improving the thread-safety of iommu domain.

Signed-off-by: Chenbo Xia <chenbox@nvidia.com>
@kailiangz1 kailiangz1 merged commit cea99c2 into Mellanox:main Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants