Lines Matching refs:vmsa

925 static int snp_set_vmsa(void *va, bool vmsa)  in snp_set_vmsa()  argument
937 if (vmsa) in snp_set_vmsa()
974 static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa) in snp_cleanup_vmsa() argument
978 err = snp_set_vmsa(vmsa, false); in snp_cleanup_vmsa()
982 free_page((unsigned long)vmsa); in snp_cleanup_vmsa()
987 struct sev_es_save_area *cur_vmsa, *vmsa; in wakeup_cpu_via_vmgexit() local
1031 vmsa = (struct sev_es_save_area *)snp_alloc_vmsa_page(); in wakeup_cpu_via_vmgexit()
1032 if (!vmsa) in wakeup_cpu_via_vmgexit()
1040 vmsa->cs.base = sipi_vector << 12; in wakeup_cpu_via_vmgexit()
1041 vmsa->cs.limit = AP_INIT_CS_LIMIT; in wakeup_cpu_via_vmgexit()
1042 vmsa->cs.attrib = INIT_CS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1043 vmsa->cs.selector = sipi_vector << 8; in wakeup_cpu_via_vmgexit()
1046 vmsa->rip = start_ip & 0xfff; in wakeup_cpu_via_vmgexit()
1049 vmsa->ds.limit = AP_INIT_DS_LIMIT; in wakeup_cpu_via_vmgexit()
1050 vmsa->ds.attrib = INIT_DS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1051 vmsa->es = vmsa->ds; in wakeup_cpu_via_vmgexit()
1052 vmsa->fs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1053 vmsa->gs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1054 vmsa->ss = vmsa->ds; in wakeup_cpu_via_vmgexit()
1056 vmsa->gdtr.limit = AP_INIT_GDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1057 vmsa->ldtr.limit = AP_INIT_LDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1058 vmsa->ldtr.attrib = INIT_LDTR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1059 vmsa->idtr.limit = AP_INIT_IDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1060 vmsa->tr.limit = AP_INIT_TR_LIMIT; in wakeup_cpu_via_vmgexit()
1061 vmsa->tr.attrib = INIT_TR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1063 vmsa->cr4 = cr4; in wakeup_cpu_via_vmgexit()
1064 vmsa->cr0 = AP_INIT_CR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1065 vmsa->dr7 = DR7_RESET_VALUE; in wakeup_cpu_via_vmgexit()
1066 vmsa->dr6 = AP_INIT_DR6_DEFAULT; in wakeup_cpu_via_vmgexit()
1067 vmsa->rflags = AP_INIT_RFLAGS_DEFAULT; in wakeup_cpu_via_vmgexit()
1068 vmsa->g_pat = AP_INIT_GPAT_DEFAULT; in wakeup_cpu_via_vmgexit()
1069 vmsa->xcr0 = AP_INIT_XCR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1070 vmsa->mxcsr = AP_INIT_MXCSR_DEFAULT; in wakeup_cpu_via_vmgexit()
1071 vmsa->x87_ftw = AP_INIT_X87_FTW_DEFAULT; in wakeup_cpu_via_vmgexit()
1072 vmsa->x87_fcw = AP_INIT_X87_FCW_DEFAULT; in wakeup_cpu_via_vmgexit()
1075 vmsa->efer = EFER_SVME; in wakeup_cpu_via_vmgexit()
1082 vmsa->vmpl = 0; in wakeup_cpu_via_vmgexit()
1083 vmsa->sev_features = sev_status >> 2; in wakeup_cpu_via_vmgexit()
1086 ret = snp_set_vmsa(vmsa, true); in wakeup_cpu_via_vmgexit()
1089 free_page((unsigned long)vmsa); in wakeup_cpu_via_vmgexit()
1100 ghcb_set_rax(ghcb, vmsa->sev_features); in wakeup_cpu_via_vmgexit()
1103 ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa)); in wakeup_cpu_via_vmgexit()
1120 snp_cleanup_vmsa(vmsa); in wakeup_cpu_via_vmgexit()
1121 vmsa = NULL; in wakeup_cpu_via_vmgexit()
1129 per_cpu(sev_vmsa, cpu) = vmsa; in wakeup_cpu_via_vmgexit()