Commit ef15090
committed
KVM: arm64: Add generic check for system-supported vCPU features
To date KVM has relied on kvm_reset_vcpu() failing when the vCPU feature
flags are unsupported by the system. This is a bit messy since
kvm_reset_vcpu() is called at runtime outside of the KVM_ARM_VCPU_INIT
ioctl when it is expected to succeed. Further complicating the matter is
that kvm_reset_vcpu() must tolerate be idemptotent to the config_lock,
as it isn't consistently called with the lock held.
Prepare to move feature compatibility checks out of kvm_reset_vcpu() with
a 'generic' check that compares the user-provided flags with a computed
maximum feature set for the system.
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Oliver Upton <[email protected]>1 parent ce9ecca commit ef15090
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1190 | 1190 | | |
1191 | 1191 | | |
1192 | 1192 | | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1193 | 1203 | | |
1194 | 1204 | | |
1195 | 1205 | | |
| |||
1204 | 1214 | | |
1205 | 1215 | | |
1206 | 1216 | | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1207 | 1220 | | |
1208 | 1221 | | |
1209 | 1222 | | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
1213 | 1223 | | |
1214 | 1224 | | |
1215 | 1225 | | |
| |||
0 commit comments