Commit d5efec7
KVM: arm64: Treat 32bit ID registers as RAZ/WI on 64bit-only system
One of the oddities of the architecture is that the AArch64 views of the
AArch32 ID registers are UNKNOWN if AArch32 isn't implemented at any EL.
Nonetheless, KVM exposes these registers to userspace for the sake of
save/restore. It is possible that the UNKNOWN value could differ between
systems, leading to a rejected write from userspace.
Avoid the issue altogether by handling the AArch32 ID registers as
RAZ/WI when on an AArch64-only system.
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220913094441.3957645-7-oliver.upton@linux.dev1 parent 4de06e4 commit d5efec7
1 file changed
Lines changed: 43 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1147 | 1161 | | |
1148 | 1162 | | |
1149 | 1163 | | |
| |||
1331 | 1345 | | |
1332 | 1346 | | |
1333 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
1334 | 1357 | | |
1335 | 1358 | | |
1336 | 1359 | | |
| |||
1418 | 1441 | | |
1419 | 1442 | | |
1420 | 1443 | | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
1424 | 1447 | | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1429 | 1452 | | |
1430 | 1453 | | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1439 | 1462 | | |
1440 | 1463 | | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
1444 | 1467 | | |
1445 | | - | |
| 1468 | + | |
1446 | 1469 | | |
1447 | | - | |
| 1470 | + | |
1448 | 1471 | | |
1449 | 1472 | | |
1450 | 1473 | | |
| |||
0 commit comments