Commit 007faec
x86/sev: Expose sev_es_ghcb_hv_call() for use by HyperV
Hyper-V needs to issue the GHCB HV call in order to read/write MSRs in
Isolation VMs. For that, expose sev_es_ghcb_hv_call().
The Hyper-V Isolation VMs are unenlightened guests and run a paravisor
at VMPL0 for communicating. GHCB pages are being allocated and set up
by that paravisor. Linux gets the GHCB page's physical address via
MSR_AMD64_SEV_ES_GHCB from the paravisor and should not change it.
Add a @set_ghcb_msr parameter to sev_es_ghcb_hv_call() to control
whether the function should set the GHCB's address prior to the call or
not and export that function for use by HyperV.
[ bp: - Massage commit message
- add a struct ghcb forward declaration to fix randconfig builds. ]
Signed-off-by: Tianyu Lan <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Reviewed-by: Michael Kelley <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent ce47d0c commit 007faec
3 files changed
+29
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
| |||
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
418 | 424 | | |
419 | 425 | | |
420 | 426 | | |
421 | | - | |
| 427 | + | |
422 | 428 | | |
423 | 429 | | |
424 | 430 | | |
| |||
460 | 466 | | |
461 | 467 | | |
462 | 468 | | |
463 | | - | |
| 469 | + | |
| 470 | + | |
464 | 471 | | |
465 | 472 | | |
466 | 473 | | |
| |||
491 | 498 | | |
492 | 499 | | |
493 | 500 | | |
494 | | - | |
| 501 | + | |
495 | 502 | | |
496 | 503 | | |
497 | 504 | | |
| |||
516 | 523 | | |
517 | 524 | | |
518 | 525 | | |
519 | | - | |
| 526 | + | |
520 | 527 | | |
521 | 528 | | |
522 | 529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
| 651 | + | |
| 652 | + | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
| |||
867 | 868 | | |
868 | 869 | | |
869 | 870 | | |
870 | | - | |
| 871 | + | |
871 | 872 | | |
872 | 873 | | |
873 | 874 | | |
| |||
1117 | 1118 | | |
1118 | 1119 | | |
1119 | 1120 | | |
1120 | | - | |
| 1121 | + | |
1121 | 1122 | | |
1122 | 1123 | | |
1123 | 1124 | | |
| |||
1147 | 1148 | | |
1148 | 1149 | | |
1149 | 1150 | | |
1150 | | - | |
| 1151 | + | |
1151 | 1152 | | |
1152 | 1153 | | |
1153 | 1154 | | |
| |||
1156 | 1157 | | |
1157 | 1158 | | |
1158 | 1159 | | |
1159 | | - | |
| 1160 | + | |
1160 | 1161 | | |
1161 | 1162 | | |
1162 | 1163 | | |
| |||
1197 | 1198 | | |
1198 | 1199 | | |
1199 | 1200 | | |
1200 | | - | |
| 1201 | + | |
1201 | 1202 | | |
1202 | 1203 | | |
1203 | 1204 | | |
| |||
0 commit comments