Home
last modified time | relevance | path

Searched refs:ghcb (Results 1 – 9 of 9) sorted by relevance

/linux/arch/x86/coco/sev/
H A Dnoinstr.c96 struct ghcb *ghcb; in __sev_es_nmi_complete() local
98 ghcb = __sev_get_ghcb(&state); in __sev_es_nmi_complete()
100 vc_ghcb_invalidate(ghcb); in __sev_es_nmi_complete()
101 ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_NMI_COMPLETE); in __sev_es_nmi_complete()
102 ghcb_set_sw_exit_info_1(ghcb, 0); in __sev_es_nmi_complete()
103 ghcb_set_sw_exit_info_2(ghcb, 0); in __sev_es_nmi_complete()
105 sev_es_wr_ghcb_msr(__pa_nodebug(ghcb)); in __sev_es_nmi_complete()
117 noinstr struct ghcb *__sev_get_ghcb(struct ghcb_state *state) in __sev_get_ghcb()
120 struct ghcb *ghcb; in __sev_get_ghcb() local
128 ghcb = &data->ghcb_page; in __sev_get_ghcb()
[all …]
H A Dcore.c127 static struct ghcb boot_ghcb_page __bss_decrypted __aligned(PAGE_SIZE);
133 struct ghcb *boot_ghcb __section(".data");
159 struct ghcb *ghcb; in get_jump_table_addr() local
167 ghcb = __sev_get_ghcb(&state); in get_jump_table_addr()
169 vc_ghcb_invalidate(ghcb); in get_jump_table_addr()
170 ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_AP_JUMP_TABLE); in get_jump_table_addr()
171 ghcb_set_sw_exit_info_1(ghcb, SVM_VMGEXIT_GET_AP_JUMP_TABLE); in get_jump_table_addr()
172 ghcb_set_sw_exit_info_2(ghcb, 0); in get_jump_table_addr()
174 sev_es_wr_ghcb_msr(__pa(ghcb)); in get_jump_table_addr()
177 if (ghcb_sw_exit_info_1_is_valid(ghcb) && in get_jump_table_addr()
[all …]
/linux/arch/x86/hyperv/
H A Divm.c36 struct ghcb ghcb; member
92 hv_ghcb->ghcb.protocol_version = GHCB_PROTOCOL_MAX; in hv_ghcb_hypercall()
93 hv_ghcb->ghcb.ghcb_usage = GHCB_USAGE_HYPERV_CALL; in hv_ghcb_hypercall()
104 hv_ghcb->ghcb.ghcb_usage = 0xffffffff; in hv_ghcb_hypercall()
105 memset(hv_ghcb->ghcb.save.valid_bitmap, 0, in hv_ghcb_hypercall()
106 sizeof(hv_ghcb->ghcb.save.valid_bitmap)); in hv_ghcb_hypercall()
125 static enum es_result hv_ghcb_hv_call(struct ghcb *ghcb, u64 exit_code, in hv_ghcb_hv_call() argument
129 ghcb->protocol_version = hv_ghcb_version; in hv_ghcb_hv_call()
130 ghcb->ghcb_usage = GHCB_DEFAULT_USAGE; in hv_ghcb_hv_call()
132 ghcb_set_sw_exit_code(ghcb, exit_code); in hv_ghcb_hv_call()
[all …]
/linux/arch/x86/boot/compressed/
H A Dsev.c30 static struct ghcb boot_ghcb_page __aligned(PAGE_SIZE);
31 struct ghcb *boot_ghcb __section(".data");
146 static void __noreturn sev_es_ghcb_terminate(struct ghcb *ghcb, unsigned int set, in sev_es_ghcb_terminate() argument
151 vc_ghcb_invalidate(ghcb); in sev_es_ghcb_terminate()
152 ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_TERM_REQUEST); in sev_es_ghcb_terminate()
153 ghcb_set_sw_exit_info_1(ghcb, exit_info_1); in sev_es_ghcb_terminate()
154 ghcb_set_sw_exit_info_2(ghcb, exit_info_2); in sev_es_ghcb_terminate()
156 sev_es_wr_ghcb_msr(__pa(ghcb)); in sev_es_ghcb_terminate()
/linux/arch/x86/include/asm/
H A Dx86_init.h5 struct ghcb;
284 void (*sev_es_hcall_prepare)(struct ghcb *ghcb, struct pt_regs *regs);
285 bool (*sev_es_hcall_finish)(struct ghcb *ghcb, struct pt_regs *regs);
/linux/arch/x86/kernel/cpu/
H A Dmshyperv.c783 static void hv_sev_es_hcall_prepare(struct ghcb *ghcb, struct pt_regs *regs) in hv_sev_es_hcall_prepare() argument
786 ghcb_set_rcx(ghcb, regs->cx); in hv_sev_es_hcall_prepare()
787 ghcb_set_rdx(ghcb, regs->dx); in hv_sev_es_hcall_prepare()
788 ghcb_set_r8(ghcb, regs->r8); in hv_sev_es_hcall_prepare()
791 static bool hv_sev_es_hcall_finish(struct ghcb *ghcb, struct pt_regs *regs) in hv_sev_es_hcall_finish() argument
/linux/arch/x86/kvm/
H A Dtrace.h1845 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb),
1846 TP_ARGS(vcpu_id, ghcb),
1857 __entry->exit_reason = ghcb->save.sw_exit_code;
1858 __entry->info1 = ghcb->save.sw_exit_info_1;
1859 __entry->info2 = ghcb->save.sw_exit_info_2;
1871 TP_PROTO(unsigned int vcpu_id, struct ghcb *ghcb),
1872 TP_ARGS(vcpu_id, ghcb),
1883 __entry->exit_reason = ghcb->save.sw_exit_code;
1884 __entry->info1 = ghcb->save.sw_exit_info_1;
1885 __entry->info2 = ghcb->save.sw_exit_info_2;
/linux/arch/x86/kvm/svm/
H A Dsvm.h246 struct ghcb *ghcb; member
682 ghcb_set_sw_exit_info_1(svm->sev_es.ghcb, response); in svm_vmgexit_set_return_code()
683 ghcb_set_sw_exit_info_2(svm->sev_es.ghcb, data); in svm_vmgexit_set_return_code()
1017 return READ_ONCE(svm->sev_es.ghcb->save.field); \
H A Dsvm.c2906 if (!err || !is_sev_es_guest(vcpu) || WARN_ON_ONCE(!svm->sev_es.ghcb)) in svm_complete_emulated_msr()