Lines Matching refs:vmsa

1164 static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa, int apic_id)  in snp_cleanup_vmsa()  argument
1168 err = snp_set_vmsa(vmsa, NULL, apic_id, false); in snp_cleanup_vmsa()
1172 free_page((unsigned long)vmsa); in snp_cleanup_vmsa()
1177 struct sev_es_save_area *cur_vmsa, *vmsa; in wakeup_cpu_via_vmgexit() local
1222 vmsa = (struct sev_es_save_area *)snp_alloc_vmsa_page(cpu); in wakeup_cpu_via_vmgexit()
1223 if (!vmsa) in wakeup_cpu_via_vmgexit()
1234 vmsa->cs.base = sipi_vector << 12; in wakeup_cpu_via_vmgexit()
1235 vmsa->cs.limit = AP_INIT_CS_LIMIT; in wakeup_cpu_via_vmgexit()
1236 vmsa->cs.attrib = INIT_CS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1237 vmsa->cs.selector = sipi_vector << 8; in wakeup_cpu_via_vmgexit()
1240 vmsa->rip = start_ip & 0xfff; in wakeup_cpu_via_vmgexit()
1243 vmsa->ds.limit = AP_INIT_DS_LIMIT; in wakeup_cpu_via_vmgexit()
1244 vmsa->ds.attrib = INIT_DS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1245 vmsa->es = vmsa->ds; in wakeup_cpu_via_vmgexit()
1246 vmsa->fs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1247 vmsa->gs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1248 vmsa->ss = vmsa->ds; in wakeup_cpu_via_vmgexit()
1250 vmsa->gdtr.limit = AP_INIT_GDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1251 vmsa->ldtr.limit = AP_INIT_LDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1252 vmsa->ldtr.attrib = INIT_LDTR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1253 vmsa->idtr.limit = AP_INIT_IDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1254 vmsa->tr.limit = AP_INIT_TR_LIMIT; in wakeup_cpu_via_vmgexit()
1255 vmsa->tr.attrib = INIT_TR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1257 vmsa->cr4 = cr4; in wakeup_cpu_via_vmgexit()
1258 vmsa->cr0 = AP_INIT_CR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1259 vmsa->dr7 = DR7_RESET_VALUE; in wakeup_cpu_via_vmgexit()
1260 vmsa->dr6 = AP_INIT_DR6_DEFAULT; in wakeup_cpu_via_vmgexit()
1261 vmsa->rflags = AP_INIT_RFLAGS_DEFAULT; in wakeup_cpu_via_vmgexit()
1262 vmsa->g_pat = AP_INIT_GPAT_DEFAULT; in wakeup_cpu_via_vmgexit()
1263 vmsa->xcr0 = AP_INIT_XCR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1264 vmsa->mxcsr = AP_INIT_MXCSR_DEFAULT; in wakeup_cpu_via_vmgexit()
1265 vmsa->x87_ftw = AP_INIT_X87_FTW_DEFAULT; in wakeup_cpu_via_vmgexit()
1266 vmsa->x87_fcw = AP_INIT_X87_FCW_DEFAULT; in wakeup_cpu_via_vmgexit()
1269 vmsa->efer = EFER_SVME; in wakeup_cpu_via_vmgexit()
1276 vmsa->vmpl = snp_vmpl; in wakeup_cpu_via_vmgexit()
1277 vmsa->sev_features = sev_status >> 2; in wakeup_cpu_via_vmgexit()
1280 ret = snp_set_vmsa(vmsa, caa, apic_id, true); in wakeup_cpu_via_vmgexit()
1283 free_page((unsigned long)vmsa); in wakeup_cpu_via_vmgexit()
1294 ghcb_set_rax(ghcb, vmsa->sev_features); in wakeup_cpu_via_vmgexit()
1300 ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa)); in wakeup_cpu_via_vmgexit()
1317 snp_cleanup_vmsa(vmsa, apic_id); in wakeup_cpu_via_vmgexit()
1318 vmsa = NULL; in wakeup_cpu_via_vmgexit()
1326 per_cpu(sev_vmsa, cpu) = vmsa; in wakeup_cpu_via_vmgexit()