Commit fd94213
hisi_acc_vfio_pci: Remove the deferred_reset logic
The deferred_reset logic was added to vfio migration drivers to prevent
a circular locking dependency with respect to mm_lock and state mutex.
This is mainly because of the copy_to/from_user() functions(which takes
mm_lock) invoked under state mutex. But for HiSilicon driver, the only
place where we now hold the state mutex for copy_to_user is during the
PRE_COPY IOCTL. So for pre_copy, release the lock as soon as we have
updated the data and perform copy_to_user without state mutex. By this,
we can get rid of the deferred_reset logic.
Link: https://lore.kernel.org/kvm/[email protected]/
Signed-off-by: Shameer Kolothum <[email protected]>
Reviewed-by: Brett Creeley <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>1 parent 5b99241 commit fd94213
File tree
2 files changed
+14
-40
lines changed- drivers/vfio/pci/hisilicon
2 files changed
+14
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
| 633 | + | |
639 | 634 | | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
652 | 638 | | |
653 | 639 | | |
654 | 640 | | |
| |||
804 | 790 | | |
805 | 791 | | |
806 | 792 | | |
| 793 | + | |
| 794 | + | |
807 | 795 | | |
808 | | - | |
| 796 | + | |
809 | 797 | | |
810 | 798 | | |
811 | 799 | | |
| |||
1071 | 1059 | | |
1072 | 1060 | | |
1073 | 1061 | | |
1074 | | - | |
| 1062 | + | |
1075 | 1063 | | |
1076 | 1064 | | |
1077 | 1065 | | |
| |||
1092 | 1080 | | |
1093 | 1081 | | |
1094 | 1082 | | |
1095 | | - | |
| 1083 | + | |
1096 | 1084 | | |
1097 | 1085 | | |
1098 | 1086 | | |
| |||
1104 | 1092 | | |
1105 | 1093 | | |
1106 | 1094 | | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
1121 | | - | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1122 | 1098 | | |
1123 | 1099 | | |
1124 | 1100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | 112 | | |
115 | 113 | | |
116 | 114 | | |
| |||
0 commit comments