File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
tools/testing/selftests/kvm Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ kvm_static_assert(SEV_RET_SUCCESS == 0);
71
71
void sev_vm_init (struct kvm_vm * vm );
72
72
void sev_es_vm_init (struct kvm_vm * vm );
73
73
74
+ static inline void vmgexit (void )
75
+ {
76
+ __asm__ __volatile__("rep; vmmcall" );
77
+ }
78
+
74
79
static inline void sev_register_encrypted_memory (struct kvm_vm * vm ,
75
80
struct userspace_mem_region * region )
76
81
{
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ static void guest_sev_es_code(void)
27
27
* force "termination" to signal "done" via the GHCB MSR protocol.
28
28
*/
29
29
wrmsr (MSR_AMD64_SEV_ES_GHCB , GHCB_MSR_TERM_REQ );
30
- __asm__ __volatile__( "rep; vmmcall" );
30
+ vmgexit ( );
31
31
}
32
32
33
33
static void guest_sev_code (void )
You can’t perform that action at this time.
0 commit comments