Commit 9358931
arm64: RME: handle RIPAS changes before kvm_rec_enter
community inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/ICX7FX?from=project-issue
Reference: https://patchew.org/linux/[email protected]/[email protected]
------------------------
Each page within the protected region of the realm guest can be marked
as either RAM or EMPTY. Allow the VMM to control this before the guest
has started and provide the equivalent functions to change this (with
the guest's approval) at runtime.
When transitioning from RIPAS RAM (1) to RIPAS EMPTY (0) the memory is
unmapped from the guest and undelegated allowing the memory to be reused
by the host. When transitioning to RIPAS RAM the actual population of
the leaf RTTs is done later on stage 2 fault, however it may be
necessary to allocate additional RTTs to allow the RMM track the RIPAS
for the requested range.
When freeing a block mapping it is necessary to temporarily unfold the
RTT which requires delegating an extra page to the RMM, this page can
then be recovered once the contents of the block mapping have been
freed.
Fixes: 4afc64441759 ("[v8-15-43]arm64: RME: Allow VMM to set RIPAS")
Signed-off-by: Steven Price <[email protected]>
Signed-off-by: Xu Raoqing <[email protected]>
Signed-off-by: WangYuli <[email protected]>1 parent f6b0b18 commit 9358931
1 file changed
+67
-65
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
283 | 284 | | |
284 | 285 | | |
285 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
286 | 342 | | |
287 | 343 | | |
288 | 344 | | |
| |||
339 | 395 | | |
340 | 396 | | |
341 | 397 | | |
| 398 | + | |
342 | 399 | | |
343 | 400 | | |
344 | 401 | | |
| |||
522 | 579 | | |
523 | 580 | | |
524 | 581 | | |
| 582 | + | |
525 | 583 | | |
526 | 584 | | |
527 | 585 | | |
| |||
625 | 683 | | |
626 | 684 | | |
627 | 685 | | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
642 | | - | |
643 | | - | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | 686 | | |
684 | 687 | | |
685 | 688 | | |
| |||
1146 | 1149 | | |
1147 | 1150 | | |
1148 | 1151 | | |
1149 | | - | |
1150 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
1151 | 1156 | | |
1152 | 1157 | | |
1153 | 1158 | | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1161 | 1162 | | |
1162 | 1163 | | |
1163 | 1164 | | |
| |||
1466 | 1467 | | |
1467 | 1468 | | |
1468 | 1469 | | |
1469 | | - | |
| 1470 | + | |
| 1471 | + | |
1470 | 1472 | | |
1471 | 1473 | | |
1472 | 1474 | | |
| |||
0 commit comments