Lines Matching refs:sev_es
54 module_param_named(sev_es, sev_es_enabled, bool, 0444);
566 struct sev_es_save_area *save = svm->sev_es.vmsa; in sev_es_sync_vmsa()
627 clflush_cache_range(svm->sev_es.vmsa, PAGE_SIZE); in __sev_launch_update_vmsa()
631 vmsa.address = __sme_pa(svm->sev_es.vmsa); in __sev_launch_update_vmsa()
1734 memcpy(&dst_svm->sev_es, &src_svm->sev_es, sizeof(src_svm->sev_es)); in sev_migrate_from()
1739 memset(&src_svm->sev_es, 0, sizeof(src_svm->sev_es)); in sev_migrate_from()
2340 sev_flush_encrypted_page(vcpu, svm->sev_es.vmsa); in sev_free_vcpu()
2342 __free_page(virt_to_page(svm->sev_es.vmsa)); in sev_free_vcpu()
2344 if (svm->sev_es.ghcb_sa_free) in sev_free_vcpu()
2345 kvfree(svm->sev_es.ghcb_sa); in sev_free_vcpu()
2350 struct ghcb *ghcb = svm->sev_es.ghcb; in dump_ghcb()
2376 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_to_ghcb()
2396 struct ghcb *ghcb = svm->sev_es.ghcb; in sev_es_sync_from_ghcb()
2444 ghcb = svm->sev_es.ghcb; in sev_es_validate_vmgexit()
2571 if (!svm->sev_es.ghcb) in sev_es_unmap_ghcb()
2574 if (svm->sev_es.ghcb_sa_free) { in sev_es_unmap_ghcb()
2580 if (svm->sev_es.ghcb_sa_sync) { in sev_es_unmap_ghcb()
2582 ghcb_get_sw_scratch(svm->sev_es.ghcb), in sev_es_unmap_ghcb()
2583 svm->sev_es.ghcb_sa, in sev_es_unmap_ghcb()
2584 svm->sev_es.ghcb_sa_len); in sev_es_unmap_ghcb()
2585 svm->sev_es.ghcb_sa_sync = false; in sev_es_unmap_ghcb()
2588 kvfree(svm->sev_es.ghcb_sa); in sev_es_unmap_ghcb()
2589 svm->sev_es.ghcb_sa = NULL; in sev_es_unmap_ghcb()
2590 svm->sev_es.ghcb_sa_free = false; in sev_es_unmap_ghcb()
2593 trace_kvm_vmgexit_exit(svm->vcpu.vcpu_id, svm->sev_es.ghcb); in sev_es_unmap_ghcb()
2597 kvm_vcpu_unmap(&svm->vcpu, &svm->sev_es.ghcb_map, true); in sev_es_unmap_ghcb()
2598 svm->sev_es.ghcb = NULL; in sev_es_unmap_ghcb()
2628 struct ghcb *ghcb = svm->sev_es.ghcb; in setup_vmgexit_scratch()
2664 scratch_va = (void *)svm->sev_es.ghcb; in setup_vmgexit_scratch()
2694 svm->sev_es.ghcb_sa_sync = sync; in setup_vmgexit_scratch()
2695 svm->sev_es.ghcb_sa_free = true; in setup_vmgexit_scratch()
2698 svm->sev_es.ghcb_sa = scratch_va; in setup_vmgexit_scratch()
2699 svm->sev_es.ghcb_sa_len = len; in setup_vmgexit_scratch()
2833 if (kvm_vcpu_map(vcpu, ghcb_gpa >> PAGE_SHIFT, &svm->sev_es.ghcb_map)) { in sev_handle_vmgexit()
2842 svm->sev_es.ghcb = svm->sev_es.ghcb_map.hva; in sev_handle_vmgexit()
2843 ghcb = svm->sev_es.ghcb_map.hva; in sev_handle_vmgexit()
2866 svm->sev_es.ghcb_sa); in sev_handle_vmgexit()
2876 svm->sev_es.ghcb_sa); in sev_handle_vmgexit()
2936 return kvm_sev_es_string_io(&svm->vcpu, size, port, svm->sev_es.ghcb_sa, in sev_es_string_io()
2952 svm->vmcb->control.vmsa_pa = __pa(svm->sev_es.vmsa); in sev_es_init_vmcb()
3037 if (!svm->sev_es.received_first_sipi) { in sev_vcpu_deliver_sipi_vector()
3038 svm->sev_es.received_first_sipi = true; in sev_vcpu_deliver_sipi_vector()
3047 if (!svm->sev_es.ghcb) in sev_vcpu_deliver_sipi_vector()
3050 ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, 1); in sev_vcpu_deliver_sipi_vector()