Commit a7a2c72
committed
KVM: arm64: Separate out feature sanitisation and initialisation
kvm_vcpu_set_target() iteratively sanitises and copies feature flags in
one go. This is rather odd, especially considering the fact that bitmap
accessors can do the heavy lifting. A subsequent change will make vCPU
features VM-wide, and fitting that into the present implementation is
just a chore.
Rework the whole thing to use bitmap accessors to sanitise and copy
flags.
Link: https://lore.kernel.org/r/20230609190054.1542113-2-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>1 parent 44c026a commit a7a2c72
2 files changed
Lines changed: 48 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1167 | 1167 | | |
1168 | 1168 | | |
1169 | 1169 | | |
1170 | | - | |
1171 | | - | |
| 1170 | + | |
| 1171 | + | |
1172 | 1172 | | |
1173 | | - | |
1174 | | - | |
| 1173 | + | |
| 1174 | + | |
1175 | 1175 | | |
1176 | | - | |
1177 | | - | |
| 1176 | + | |
| 1177 | + | |
1178 | 1178 | | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1185 | 1183 | | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
| 1184 | + | |
| 1185 | + | |
1189 | 1186 | | |
1190 | | - | |
1191 | | - | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
1192 | 1191 | | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
1200 | 1195 | | |
1201 | | - | |
1202 | | - | |
1203 | | - | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1204 | 1201 | | |
1205 | | - | |
| 1202 | + | |
| 1203 | + | |
1206 | 1204 | | |
1207 | 1205 | | |
1208 | 1206 | | |
| |||
1214 | 1212 | | |
1215 | 1213 | | |
1216 | 1214 | | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
1217 | 1236 | | |
1218 | 1237 | | |
1219 | 1238 | | |
| |||
0 commit comments