Lines Matching refs:vmsa

897 static int snp_set_vmsa(void *va, bool vmsa)  in snp_set_vmsa()  argument
909 if (vmsa) in snp_set_vmsa()
946 static void snp_cleanup_vmsa(struct sev_es_save_area *vmsa) in snp_cleanup_vmsa() argument
950 err = snp_set_vmsa(vmsa, false); in snp_cleanup_vmsa()
954 free_page((unsigned long)vmsa); in snp_cleanup_vmsa()
959 struct sev_es_save_area *cur_vmsa, *vmsa; in wakeup_cpu_via_vmgexit() local
1003 vmsa = (struct sev_es_save_area *)snp_alloc_vmsa_page(); in wakeup_cpu_via_vmgexit()
1004 if (!vmsa) in wakeup_cpu_via_vmgexit()
1012 vmsa->cs.base = sipi_vector << 12; in wakeup_cpu_via_vmgexit()
1013 vmsa->cs.limit = AP_INIT_CS_LIMIT; in wakeup_cpu_via_vmgexit()
1014 vmsa->cs.attrib = INIT_CS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1015 vmsa->cs.selector = sipi_vector << 8; in wakeup_cpu_via_vmgexit()
1018 vmsa->rip = start_ip & 0xfff; in wakeup_cpu_via_vmgexit()
1021 vmsa->ds.limit = AP_INIT_DS_LIMIT; in wakeup_cpu_via_vmgexit()
1022 vmsa->ds.attrib = INIT_DS_ATTRIBS; in wakeup_cpu_via_vmgexit()
1023 vmsa->es = vmsa->ds; in wakeup_cpu_via_vmgexit()
1024 vmsa->fs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1025 vmsa->gs = vmsa->ds; in wakeup_cpu_via_vmgexit()
1026 vmsa->ss = vmsa->ds; in wakeup_cpu_via_vmgexit()
1028 vmsa->gdtr.limit = AP_INIT_GDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1029 vmsa->ldtr.limit = AP_INIT_LDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1030 vmsa->ldtr.attrib = INIT_LDTR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1031 vmsa->idtr.limit = AP_INIT_IDTR_LIMIT; in wakeup_cpu_via_vmgexit()
1032 vmsa->tr.limit = AP_INIT_TR_LIMIT; in wakeup_cpu_via_vmgexit()
1033 vmsa->tr.attrib = INIT_TR_ATTRIBS; in wakeup_cpu_via_vmgexit()
1035 vmsa->cr4 = cr4; in wakeup_cpu_via_vmgexit()
1036 vmsa->cr0 = AP_INIT_CR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1037 vmsa->dr7 = DR7_RESET_VALUE; in wakeup_cpu_via_vmgexit()
1038 vmsa->dr6 = AP_INIT_DR6_DEFAULT; in wakeup_cpu_via_vmgexit()
1039 vmsa->rflags = AP_INIT_RFLAGS_DEFAULT; in wakeup_cpu_via_vmgexit()
1040 vmsa->g_pat = AP_INIT_GPAT_DEFAULT; in wakeup_cpu_via_vmgexit()
1041 vmsa->xcr0 = AP_INIT_XCR0_DEFAULT; in wakeup_cpu_via_vmgexit()
1042 vmsa->mxcsr = AP_INIT_MXCSR_DEFAULT; in wakeup_cpu_via_vmgexit()
1043 vmsa->x87_ftw = AP_INIT_X87_FTW_DEFAULT; in wakeup_cpu_via_vmgexit()
1044 vmsa->x87_fcw = AP_INIT_X87_FCW_DEFAULT; in wakeup_cpu_via_vmgexit()
1047 vmsa->efer = EFER_SVME; in wakeup_cpu_via_vmgexit()
1054 vmsa->vmpl = 0; in wakeup_cpu_via_vmgexit()
1055 vmsa->sev_features = sev_status >> 2; in wakeup_cpu_via_vmgexit()
1058 ret = snp_set_vmsa(vmsa, true); in wakeup_cpu_via_vmgexit()
1061 free_page((unsigned long)vmsa); in wakeup_cpu_via_vmgexit()
1072 ghcb_set_rax(ghcb, vmsa->sev_features); in wakeup_cpu_via_vmgexit()
1075 ghcb_set_sw_exit_info_2(ghcb, __pa(vmsa)); in wakeup_cpu_via_vmgexit()
1092 snp_cleanup_vmsa(vmsa); in wakeup_cpu_via_vmgexit()
1093 vmsa = NULL; in wakeup_cpu_via_vmgexit()
1101 per_cpu(sev_vmsa, cpu) = vmsa; in wakeup_cpu_via_vmgexit()