Lines Matching refs:vmsa
1089 static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa, int apic_id) in snp_cleanup_vmsa() argument
1093 err = snp_set_vmsa(vmsa, NULL, apic_id, false); in snp_cleanup_vmsa()
1097 free_page((unsigned long)vmsa); in snp_cleanup_vmsa()
1102 struct sev_es_save_area *cur_vmsa, *vmsa; in wakeup_cpu_via_vmgexit() local
1147 vmsa = (struct sev_es_save_area *)snp_alloc_vmsa_page(cpu); in wakeup_cpu_via_vmgexit()
1148 if (!vmsa) in wakeup_cpu_via_vmgexit()
1159 vmsa->cs.base = sipi_vector << 12; in wakeup_cpu_via_vmgexit()
1160 vmsa->cs.limit = AP_INIT_CS_LIMIT; in wakeup_cpu_via_vmgexit()
1161 vmsa->cs.attrib = INIT_CS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1162 vmsa->cs.selector = sipi_vector << 8; in wakeup_cpu_via_vmgexit()
1165 vmsa->rip = start_ip & 0xfff; in wakeup_cpu_via_vmgexit()
1168 vmsa->ds.limit = AP_INIT_DS_LIMIT; in wakeup_cpu_via_vmgexit()
1169 vmsa->ds.attrib = INIT_DS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1170 vmsa->es = vmsa->ds; in wakeup_cpu_via_vmgexit()
1171 vmsa->fs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1172 vmsa->gs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1173 vmsa->ss = vmsa->ds; in wakeup_cpu_via_vmgexit()
1175 vmsa->gdtr.limit = AP_INIT_GDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1176 vmsa->ldtr.limit = AP_INIT_LDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1177 vmsa->ldtr.attrib = INIT_LDTR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1178 vmsa->idtr.limit = AP_INIT_IDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1179 vmsa->tr.limit = AP_INIT_TR_LIMIT; in wakeup_cpu_via_vmgexit()
1180 vmsa->tr.attrib = INIT_TR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1182 vmsa->cr4 = cr4; in wakeup_cpu_via_vmgexit()
1183 vmsa->cr0 = AP_INIT_CR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1184 vmsa->dr7 = DR7_RESET_VALUE; in wakeup_cpu_via_vmgexit()
1185 vmsa->dr6 = AP_INIT_DR6_DEFAULT; in wakeup_cpu_via_vmgexit()
1186 vmsa->rflags = AP_INIT_RFLAGS_DEFAULT; in wakeup_cpu_via_vmgexit()
1187 vmsa->g_pat = AP_INIT_GPAT_DEFAULT; in wakeup_cpu_via_vmgexit()
1188 vmsa->xcr0 = AP_INIT_XCR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1189 vmsa->mxcsr = AP_INIT_MXCSR_DEFAULT; in wakeup_cpu_via_vmgexit()
1190 vmsa->x87_ftw = AP_INIT_X87_FTW_DEFAULT; in wakeup_cpu_via_vmgexit()
1191 vmsa->x87_fcw = AP_INIT_X87_FCW_DEFAULT; in wakeup_cpu_via_vmgexit()
1194 vmsa->efer = EFER_SVME; in wakeup_cpu_via_vmgexit()
1201 vmsa->vmpl = snp_vmpl; in wakeup_cpu_via_vmgexit()
1202 vmsa->sev_features = sev_status >> 2; in wakeup_cpu_via_vmgexit()
1205 ret = snp_set_vmsa(vmsa, caa, apic_id, true); in wakeup_cpu_via_vmgexit()
1208 free_page((unsigned long)vmsa); in wakeup_cpu_via_vmgexit()
1219 ghcb_set_rax(ghcb, vmsa->sev_features); in wakeup_cpu_via_vmgexit()
1225 ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa)); in wakeup_cpu_via_vmgexit()
1242 snp_cleanup_vmsa(vmsa, apic_id); in wakeup_cpu_via_vmgexit()
1243 vmsa = NULL; in wakeup_cpu_via_vmgexit()
1251 per_cpu(sev_vmsa, cpu) = vmsa; in wakeup_cpu_via_vmgexit()