File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -221,24 +221,6 @@ static __always_inline struct ghcb *sev_es_get_ghcb(struct ghcb_state *state)
221
221
return ghcb ;
222
222
}
223
223
224
- static __always_inline void sev_es_put_ghcb (struct ghcb_state * state )
225
- {
226
- struct sev_es_runtime_data * data ;
227
- struct ghcb * ghcb ;
228
-
229
- data = this_cpu_read (runtime_data );
230
- ghcb = & data -> ghcb_page ;
231
-
232
- if (state -> ghcb ) {
233
- /* Restore GHCB from Backup */
234
- * ghcb = * state -> ghcb ;
235
- data -> backup_ghcb_active = false;
236
- state -> ghcb = NULL ;
237
- } else {
238
- data -> ghcb_active = false;
239
- }
240
- }
241
-
242
224
/* Needed in vc_early_forward_exception */
243
225
void do_early_exception (struct pt_regs * regs , int trapnr );
244
226
@@ -461,6 +443,24 @@ static enum es_result vc_slow_virt_to_phys(struct ghcb *ghcb, struct es_em_ctxt
461
443
/* Include code shared with pre-decompression boot stage */
462
444
#include "sev-shared.c"
463
445
446
+ static __always_inline void sev_es_put_ghcb (struct ghcb_state * state )
447
+ {
448
+ struct sev_es_runtime_data * data ;
449
+ struct ghcb * ghcb ;
450
+
451
+ data = this_cpu_read (runtime_data );
452
+ ghcb = & data -> ghcb_page ;
453
+
454
+ if (state -> ghcb ) {
455
+ /* Restore GHCB from Backup */
456
+ * ghcb = * state -> ghcb ;
457
+ data -> backup_ghcb_active = false;
458
+ state -> ghcb = NULL ;
459
+ } else {
460
+ data -> ghcb_active = false;
461
+ }
462
+ }
463
+
464
464
void noinstr __sev_es_nmi_complete (void )
465
465
{
466
466
struct ghcb_state state ;
You can’t perform that action at this time.
0 commit comments