mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
virtio-iommu: Use recursive lock to avoid deadlock
When switching address space with mutex lock hold, mapping will be replayed for assigned device. This will trigger relock deadlock. Also release the mutex resource in unrealize routine. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Message-Id: <20220613061010.2674054-3-zhenzhong.duan@intel.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
90519b9053
commit
08f2030a2e
2 changed files with 12 additions and 10 deletions
|
@ -58,7 +58,7 @@ struct VirtIOIOMMU {
|
|||
ReservedRegion *reserved_regions;
|
||||
uint32_t nb_reserved_regions;
|
||||
GTree *domains;
|
||||
QemuMutex mutex;
|
||||
QemuRecMutex mutex;
|
||||
GTree *endpoints;
|
||||
bool boot_bypass;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue