Re: [RFC PATCH 01/10] xen: pci: add per-domain pci list lock

2023-02-15 Thread Jan Beulich
On 15.02.2023 00:38, Volodymyr Babchuk wrote: > Stefano Stabellini writes: >> On Wed, 31 Aug 2022, Volodymyr Babchuk wrote: >> 1) iommu.c:reassign_device_ownership and pci_amd_iommu.c:reassign_device >> Both functions without any pdevs_lock locking do: >> list_move(>domain_list, >pdev_list); >>

Re: [RFC PATCH 01/10] xen: pci: add per-domain pci list lock

2023-02-14 Thread Volodymyr Babchuk
Hello Stefano, Stefano Stabellini writes: > On Wed, 31 Aug 2022, Volodymyr Babchuk wrote: >> domain->pdevs_lock protects access to domain->pdev_list. >> As this, it should be used when we are adding, removing on enumerating >> PCI devices assigned to a domain. >> >> This enables more

Re: [RFC PATCH 01/10] xen: pci: add per-domain pci list lock

2023-01-27 Thread Jan Beulich
On 27.01.2023 00:18, Stefano Stabellini wrote: > On Wed, 31 Aug 2022, Volodymyr Babchuk wrote: >> @@ -1571,6 +1595,7 @@ static int iommu_get_device_group( >> if ( sdev_id < 0 ) >> { >> pcidevs_unlock(); >> +spin_unlock(>pdevs_lock); > > lock inversion >

Re: [RFC PATCH 01/10] xen: pci: add per-domain pci list lock

2023-01-26 Thread Stefano Stabellini
On Wed, 31 Aug 2022, Volodymyr Babchuk wrote: > domain->pdevs_lock protects access to domain->pdev_list. > As this, it should be used when we are adding, removing on enumerating > PCI devices assigned to a domain. > > This enables more granular locking instead of one huge pcidevs_lock that >

[RFC PATCH 01/10] xen: pci: add per-domain pci list lock

2022-08-31 Thread Volodymyr Babchuk
domain->pdevs_lock protects access to domain->pdev_list. As this, it should be used when we are adding, removing on enumerating PCI devices assigned to a domain. This enables more granular locking instead of one huge pcidevs_lock that locks entire PCI subsystem. Please note that pcidevs_lock() is