Commit 48547fe
committed
KVM: SVM: Add a helper to convert a SME-aware PA back to a struct page
Add __sme_pa_to_page() to pair with __sme_page_pa() and use it to replace
open coded equivalents, including for "iopm_base", which previously
avoided having to do __sme_clr() by storing the raw PA in the global
variable.
Opportunistically convert __sme_page_pa() to a helper to provide type
safety.
No functional change intended.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>1 parent c501062 commit 48547fe
2 files changed
+19
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
1127 | | - | |
1128 | | - | |
| 1127 | + | |
1129 | 1128 | | |
1130 | 1129 | | |
1131 | 1130 | | |
| |||
1301 | 1300 | | |
1302 | 1301 | | |
1303 | 1302 | | |
1304 | | - | |
| 1303 | + | |
1305 | 1304 | | |
1306 | 1305 | | |
1307 | 1306 | | |
| |||
1503 | 1502 | | |
1504 | 1503 | | |
1505 | 1504 | | |
1506 | | - | |
| 1505 | + | |
1507 | 1506 | | |
1508 | 1507 | | |
1509 | 1508 | | |
| |||
5251 | 5250 | | |
5252 | 5251 | | |
5253 | 5252 | | |
5254 | | - | |
| 5253 | + | |
5255 | 5254 | | |
5256 | 5255 | | |
5257 | 5256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
29 | 43 | | |
30 | 44 | | |
31 | 45 | | |
| |||
0 commit comments