Commit 6f6aed2
mshv: Centralize guest memory region destruction
Centralize guest memory region destruction to prevent resource leaks and
inconsistent cleanup across unmap and partition destruction paths.
Unify region removal, encrypted partition access recovery, and region
invalidation to improve maintainability and reliability. Reduce code
duplication and make future updates less error-prone by encapsulating
cleanup logic in a single helper.
Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
Reviewed-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Reviewed-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>1 parent df4ff5f commit 6f6aed2
1 file changed
Lines changed: 34 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1356 | 1356 | | |
1357 | 1357 | | |
1358 | 1358 | | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1359 | 1389 | | |
1360 | 1390 | | |
1361 | 1391 | | |
1362 | 1392 | | |
1363 | 1393 | | |
1364 | 1394 | | |
1365 | | - | |
1366 | 1395 | | |
1367 | 1396 | | |
1368 | 1397 | | |
| |||
1377 | 1406 | | |
1378 | 1407 | | |
1379 | 1408 | | |
1380 | | - | |
| 1409 | + | |
1381 | 1410 | | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | 1411 | | |
1393 | 1412 | | |
1394 | 1413 | | |
| |||
1724 | 1743 | | |
1725 | 1744 | | |
1726 | 1745 | | |
1727 | | - | |
1728 | 1746 | | |
| 1747 | + | |
1729 | 1748 | | |
1730 | 1749 | | |
1731 | 1750 | | |
| |||
1789 | 1808 | | |
1790 | 1809 | | |
1791 | 1810 | | |
1792 | | - | |
1793 | 1811 | | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
1797 | | - | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
1802 | | - | |
1803 | | - | |
1804 | | - | |
1805 | | - | |
1806 | | - | |
1807 | | - | |
1808 | | - | |
1809 | | - | |
1810 | | - | |
| 1812 | + | |
| 1813 | + | |
1811 | 1814 | | |
1812 | 1815 | | |
1813 | 1816 | | |
| |||
0 commit comments