virt inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/qemu/issues/264 The iommufd-pgfault fd is not released when the guest OS reboot. As a result, the number of fd increases by one each time the guest OS reboot. When the number of fd reaches the upper limit, fd cannot be allocated, and QEMU core dumps occur. Fixes: cada49a7f8 ("[BigDipperV5R9][QEMU-VIRT] hw/arm/smmuv3: Close unreleased iommufd-pgfault fd") Signed-off-by: Jinqian Yang <yangjinqian1@huawei.com> --- hw/arm/smmu-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 65314e0e44..4a75dbb11a 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -880,6 +880,7 @@ void smmu_dev_uninstall_nested_ste(SMMUDevice *sdev, bool abort) qemu_thread_join(&s1_hwpt->write_fault_thread); qemu_mutex_destroy(&s1_hwpt->fault_mutex); io_uring_queue_exit(&s1_hwpt->fault_ring); + close(s1_hwpt->out_fault_fd); } if (!host_iommu_device_iommufd_attach_hwpt(idev, hwpt_id, NULL)) { -- 2.33.0