drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting
Subsystems (3)
PATCH 1/1 drm/amdkfd: Disallow debugfs to hang hws when GPU is resetting
If GPU is during a resetting cycle, writing to GPU can cause unpredictable protection fault. Disallow using kfd debugfs hang_hws to hang hws if GPU is resetting.
--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +5 -0
@@ -1390,6 +1390,11 @@ int kfd_debugfs_hang_hws(struct kfd_dev *dev)return -EINVAL ; } +if (dev->dqm->is_resetting) { +pr_err ("HWS is already under resetting, please wait the current reset to finish\n" ); +return -EBUSY ; + } + r =pm_debugfs_hang_hws (&dev->dqm->packets);if (!r) r =dqm_debugfs_execute_queues (dev->dqm);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only]
Some slight grammar
Quoted 24 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Oak Zeng
Sent: Wednesday, July 7, 2021 12:28 PM
To: [email protected]
Cc: Bai, Zoy (zoybai) <[email protected]>; Xu, Feifei <[email protected]>; Kuehling, Felix <[email protected]>; Lazar, Lijo <[email protected]>; Zeng, Oak <[email protected]>
Subject: [PATCH] drm/amdkfd: Disallow debugfs to hang hws when GPU is resettingIf GPU is during a resetting cycle, writing to GPU can cause unpredictable protection fault. Disallow using kfd debugfs
hang_hwsto hang hws if GPU is resetting.Signed-off-by Oak Zeng <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_device.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_device.c int kfd_debugfs_hang_hws(struct kfd_dev *dev) · line 1395
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2
-0@@ -1390,6 +1390,11 @@ int kfd_debugfs_hang_hws(struct kfd_dev *dev)return -EINVAL ; } +if (dev->dqm->is_resetting) { +pr_err ("HWS is already under resetting, please wait the current reset to finish\n");
pr_err("HWS is already resetting, please wait for the current reset to finish\n");
Quoted 9 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +3
-0+return -EBUSY ; + } + r =pm_debugfs_hang_hws (&dev->dqm->packets);if (!r)r =
dqm_debugfs_execute_queues(dev->dqm);
--
2.7.4
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.or
g%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Ckent.russell%40amd.com%7Cc5c011d6af3c424ef09708d941643 c61%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637612721494784138%7CUnk nown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXV CI6Mn0%3D%7C3000&sdata=FnD7q%2BKiU82DCSQqMvgA8D6f%2FPS6hnQIBE7Q8tCh h7g%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx